Log In  
Follow
Patateafrite

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

[ Continue Reading.. ]

6 comments