Patateafrite [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=48724 Random runtime error without touching anything <p> <table><tr><td> <a href="/bbs/?pid=84877#p"> <img src="/bbs/thumbs/pico8_mastermind-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=84877#p"> mastermind</a><br><br> by <a href="/bbs/?uid=48724"> Patateafrite</a> <br><br><br> <a href="/bbs/?pid=84877#p"> [Click to Play]</a> </td></tr></table> </p> <p>Hello, i have an obscure problem in my first game. I have a random runtime error after a while in the game.</p> <p>Pico-8 say : runtime error Attempt to perform arithmetic on field '?' (a nil value)</p> <p>It's in this function :<br /> <div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"><br /> function couleur_plus()<br /> for i=1, niv do<br /> rectfill(26,tpy[i],30,tpy[i]+4,tc1[i])<br /> rectfill(35,tpy[i],39,tpy[i]+4,tc2[i])<br /> rectfill(44,tpy[i],48,tpy[i]+4,tc3[i])<br /> rectfill(53,tpy[i],57,tpy[i]+4,tc4[i])<br /> rectfill(62,tpy[i],66,tpy[i]+4,tc5[i])</p> <p>rectfill(79,tpy[i],83,tpy[i]+4,tv1[i])<br /> rectfill(88,tpy[i],92,tpy[i]+4,tv2[i])<br /> rectfill(97,tpy[i],101,tpy[i]+4,tv3[i])<br /> rectfill(106,tpy[i],110,tpy[i]+4,tv4[i])<br /> rectfill(115,tpy[i],119,tpy[i]+4,tv5[i])</p> <p>if (test==1) niv+=1<br /> test+=1<br /> end<br /> end<br /> </div></div></div></p> <p>I don't understand why this problem triggered.</p> <p>can you help me ?</p> <p>To have the bug, play to the game a little and wait a few minutes.</p> <p>if you can test the game, the but is to find the secret code.<br /> For this, choose 5 colors (maybe the same) and clic to the green button for validate.<br /> 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.<br /> Touch &quot;x&quot; for reload the game.</p> <p>Thanks you for your Help.</p> <p>PatateaFrite a French Guy with a broken english. :)</p> https://www.lexaloffle.com/bbs/?tid=40614 https://www.lexaloffle.com/bbs/?tid=40614 Mon, 30 Nov 2020 21:11:39 UTC