bagelbyheart [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=48074 Stumped on table load <p>ok, so I'm stumped. I have a table that works fine when I make it in the command line, but is missing a value when I reference it from cart. There are no errors on load of the cart data.</p> <p>Here is the table:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>bomber={ spr={33,34,35}, val=1000, aspd=10, gun=missile, -- table mov=_circles, -- function ebhv=function(self) local e=self if (e.elite&gt;elitecut) then e.val=e.val*4 end end }</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>I am using the following command to check the table when loaded:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>for k,v in pairs(bomber) do print(k..&quot; &quot;..type(v)) end</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Which returns:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>aspd number ebhv function spr table val number mov function</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Whereas pasting the table into command line and running that again returns:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>aspd number ebhv function spr table gun table val number mov function</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Finally I made a dummy cart that seems to work as expected.</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>function check(tbl) for k,v in pairs(tbl) do print(k..&quot; &quot;..type(v)) end end function pew() return null end function _circles() return null end missile={} missile.n=&quot;homing&quot; missile.f=pew bomber={ spr={33,34,35}, val=1000, aspd=10, gun=missile, -- table mov=_circles, -- function ebhv=function(self) local e=self if (e.elite&gt;elitecut) then e.val=e.val*4 end end }</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p> <table><tr><td> <a href="/bbs/?pid=88307#p"> <img src="/bbs/thumbs/pico8_yafuziyose-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=88307#p"> yafuziyose</a><br><br> by <a href="/bbs/?uid=48074"> bagelbyheart</a> <br><br><br> <a href="/bbs/?pid=88307#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=41805 https://www.lexaloffle.com/bbs/?tid=41805 Sun, 28 Feb 2021 19:51:11 UTC Spacenoider 1.0 <p> <table><tr><td> <a href="/bbs/?pid=83876#p"> <img src="/bbs/thumbs/pico8_zebozanone-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=83876#p"> Spacenoider 1.0</a><br><br> by <a href="/bbs/?uid=48074"> bagelbyheart</a> <br><br><br> <a href="/bbs/?pid=83876#p"> [Click to Play]</a> </td></tr></table> </p> <p>My first attempt at a shmup type game. Fairly basic with 3 enemy and weapon types in addition to bombs and life drops.</p> <p>The code is a mess. I might go through and refactor it one day, but I'm mostly just happy to be done =)</p> https://www.lexaloffle.com/bbs/?tid=40248 https://www.lexaloffle.com/bbs/?tid=40248 Fri, 06 Nov 2020 21:08:45 UTC