Log In  
Follow
Patateafrite
[ :: Read More :: ]

Cart #mastermind-0 | 2020-11-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Hello, i have an obscure problem in my first game. I have a random runtime error after a while in the game.

Pico-8 say : runtime error Attempt to perform arithmetic on field '?' (a nil value)

It's in this function :


function couleur_plus()
for i=1, niv do
rectfill(26,tpy[i],30,tpy[i]+4,tc1[i])
rectfill(35,tpy[i],39,tpy[i]+4,tc2[i])
rectfill(44,tpy[i],48,tpy[i]+4,tc3[i])
rectfill(53,tpy[i],57,tpy[i]+4,tc4[i])
rectfill(62,tpy[i],66,tpy[i]+4,tc5[i])

rectfill(79,tpy[i],83,tpy[i]+4,tv1[i])
rectfill(88,tpy[i],92,tpy[i]+4,tv2[i])
rectfill(97,tpy[i],101,tpy[i]+4,tv3[i])
rectfill(106,tpy[i],110,tpy[i]+4,tv4[i])
rectfill(115,tpy[i],119,tpy[i]+4,tv5[i])

if (test==1) niv+=1
test+=1
end
end

I don't understand why this problem triggered.

can you help me ?

To have the bug, play to the game a little and wait a few minutes.

if you can test the game, the but is to find the secret code.
For this, choose 5 colors (maybe the same) and clic to the green button for validate.
if you have a yellow: it's a good color at the wrong place. a green it's a good color at the good place.
Touch "x" for reload the game.

Thanks you for your Help.

PatateaFrite a French Guy with a broken english. :)

P#84877 2020-11-30 21:11 ( Edited 2020-11-30 21:13)

Follow Lexaloffle:          
Generated 2024-04-20 12:50:07 | 0.072s | Q:10