my_name_is_doof [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=71921 can't call a value from the table i have the function defined in <p> <table><tr><td> <a href="/bbs/?pid=158873#p"> <img src="/bbs/thumbs/pico8_aa-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=158873#p"> lmao wonder how rare this id is</a><br><br> by <a href="/bbs/?uid=71921"> my_name_is_doof</a> <br><br><br> <a href="/bbs/?pid=158873#p"> [Click to Play]</a> </td></tr></table> </p> <p>issue</p> <p>i'm trying out some object oriented programming but i've run into some confusion<br /> when i make a value in a list derived from another list </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>class={ new=function(self,tbl) tbl=tbl or {} setmetatable(tbl,{ __index=self }) return tbl end, } entity=class:new({ --dsp is read by the main upd --stands for despawn --removes the entity from the --list if true --dsp=false, --dspwait=false, x=0, y='smelly', --o is for origin ox=0, oy=0, sprn=1, --s is for size --the size of the spr that is xs=1, ys=1, --a is for animation asprnum=2, --asp is how much to divide --the tmr by --so 1 is every frame, --2 is evey other frame, --3 is every third frame, --etc. aspd=1, --update=function() --if x&lt; camera.x+8 or x&gt; camera.x+128 then --if --dsp = true --end --end, draw=function() spr(sprn,x,y) print(y) 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>and then try to reference a value from that same table from a function (as seen in the draw function<br /> in the entity class) it spits out nil. i have the entire cart up above as you likely have already seen, ignore that it's trying to draw a sprite at a position thats text. i set y to smelly for testing so i could easily see if it was spitting out smelly or it was spitting out nil.</p> <p>wait you can paste pico-8 sprites in here<br /> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/71921_0.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_71921_0"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/71921_0.txt", function (retdata){ var el = document.getElementById("gfxcode_71921_0"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_71921_0" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </p> https://www.lexaloffle.com/bbs/?tid=145957 https://www.lexaloffle.com/bbs/?tid=145957 Sat, 07 Dec 2024 01:38:07 UTC File system does not work when booted from a bash script on pi <p><a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a></p> <p>when i add </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>/home/pi/pico-8/pico8_dyn -splore</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>to .bashrc or to my own bash script and run it, the file menu inside of splore is completely blank, and nothing shows up when i ls. however when run directly from the command line it functions as it should. it should be noted that i am running ras[b]ian lite 32 on my system, i am on a pi 3 a+ bought this year, and i have no games in the main folder, but in a subfolder. but the log file that is in the main folder does not show either.</p> <p>this is using the latest vesion as of now, 0.2.6b.</p> <p>Edit: i put in the games in the subfolder, and the sub folder is being used as a mounting point for a usb stick.</p> https://www.lexaloffle.com/bbs/?tid=145274 https://www.lexaloffle.com/bbs/?tid=145274 Mon, 11 Nov 2024 15:04:30 UTC downloading carts from splore <p>would it be possible to add a feature to download carts directly from splore inside pico-8 to a folder in .lexaloffle/pico-8/ that would be configurable in .lexaloffle/pico-8/config.txt in the same manor the carts and save data folders are configurable?</p> https://www.lexaloffle.com/bbs/?tid=145217 https://www.lexaloffle.com/bbs/?tid=145217 Fri, 08 Nov 2024 16:39:54 UTC I don't have swarm racer anymore <p>Whahappen to my swarm racer licence?</p> https://www.lexaloffle.com/bbs/?tid=145202 https://www.lexaloffle.com/bbs/?tid=145202 Thu, 07 Nov 2024 15:05:58 UTC I&rsquo;m less stupid <p>I&rsquo;m less stupid</p> https://www.lexaloffle.com/bbs/?tid=142932 https://www.lexaloffle.com/bbs/?tid=142932 Mon, 01 Jul 2024 17:18:52 UTC Changing internet connection through pico 8 on raspi <p>Is it possible to change what Wi-Fi your connected to via pico 8 on raspi?<br /> Clarification: have pico 8 itself modify your internet connection</p> https://www.lexaloffle.com/bbs/?tid=142929 https://www.lexaloffle.com/bbs/?tid=142929 Mon, 01 Jul 2024 14:34:43 UTC Where asin <p>There is no asin()</p> https://www.lexaloffle.com/bbs/?tid=141981 https://www.lexaloffle.com/bbs/?tid=141981 Fri, 26 Apr 2024 21:17:43 UTC how does fget work <p>idk how to get fget to check for a specific flag in picotron</p> https://www.lexaloffle.com/bbs/?tid=141154 https://www.lexaloffle.com/bbs/?tid=141154 Wed, 27 Mar 2024 13:04:07 UTC no mget or fget <p>there is no mget or fget</p> <p>when i load my collision engine the uses both it gives me an error and when i look at the engine fget and mget are not lit up</p> <p>if they have been renamed and you know there new names please help</p> https://www.lexaloffle.com/bbs/?tid=141087 https://www.lexaloffle.com/bbs/?tid=141087 Mon, 25 Mar 2024 17:50:48 UTC Weird stick glitch <p>The btn call acts very strange with the joystick where if I were to program</p> <p>P1.x += btn(1)/125.5 - btn(0)/125.5</p> <p>It would return the error: &ldquo;attempt to perform arithmetic on a Boolean value&rdquo;<br /> Even though btn(1) and btn(0) both return numbers.</p> <p>Some other things that may be of importance are that I am using the Linux version on my steam deck, and that I could not find startup.lua in my files.</p> https://www.lexaloffle.com/bbs/?tid=140641 https://www.lexaloffle.com/bbs/?tid=140641 Sun, 24 Mar 2024 18:47:11 UTC how does gpio access work i'm confused <p>how do i access gpio and how does it work like is 0x5f85 the 5th pin or the 6th pin how the heck do i count in decimals why is there a face on my wal-</p> <p>(i don't actually own a pi i'm just trying to code for one)</p> https://www.lexaloffle.com/bbs/?tid=54920 https://www.lexaloffle.com/bbs/?tid=54920 Mon, 06 Nov 2023 19:22:53 UTC Does anyone else have this <p>Did anyone else get swarm racer 3000 with their copy of pico-8 (and is it any good) or is it just me</p> <p>From your local autism gremlin</p> https://www.lexaloffle.com/bbs/?tid=50445 https://www.lexaloffle.com/bbs/?tid=50445 Thu, 01 Jun 2023 14:35:10 UTC KIRBY <p>KIRBY</p> <p> <table><tr><td> <a href="/bbs/?pid=129601#p"> <img src="/bbs/thumbs/pico8_sebopefami-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=129601#p"> kirby squish 1.0</a><br><br> by <a href="/bbs/?uid=71921"> my_name_is_doof</a> <br><br><br> <a href="/bbs/?pid=129601#p"> [Click to Play]</a> </td></tr></table> </p> <p>random thing i had lying around so i decided to post it because i need some filler while i work on my platformer<br /> edit: that will probably never come out</p> https://www.lexaloffle.com/bbs/?tid=52682 https://www.lexaloffle.com/bbs/?tid=52682 Wed, 10 May 2023 13:28:55 UTC I need some more help <p>Some more scratch blocks that I don&rsquo;t know if they&rsquo;re in pico 8</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/71921/1FC0CB69-E1C6-4D52-9D1D-67B2788007D0.jpeg" alt="" /> <p>If you don&rsquo;t know what they do:</p> <p>-length of(&ldquo;apple&rdquo;):<br /> -takes the input of a string and outputs how many characters are in that string (for example, length of(apple) = 5</p> <p>-length of(listname):<br /> -takes the input of an array and outputs how long that array is (for example:</p> <p>X={1,2,5,3,7,}<br /> Z=length of(x)<br /> //Z == 5</p> <p>)</p> <p>So if you know if these are in pico 8 and what they are please tell me</p> https://www.lexaloffle.com/bbs/?tid=50623 https://www.lexaloffle.com/bbs/?tid=50623 Mon, 12 Dec 2022 14:28:40 UTC my mind right now <p> <table><tr><td> <a href="/bbs/?pid=122042#p"> <img src="/bbs/thumbs/pico8_empty-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=122042#p"> empty</a><br><br> by <a href="/bbs/?uid=71921"> my_name_is_doof</a> <br><br><br> <a href="/bbs/?pid=122042#p"> [Click to Play]</a> </td></tr></table> </p> <p><a href="https://www.lexaloffle.com/bbs/?uid=49583"> @bikibird</a> for speako-8</p> <p>my head for being empty</p> <p>also the original creator of the meme<br /> l<br /> l<br /> edit: oh god i just was thinking to myself how i hate people who do this i've become my own villain oh god oh crap-</p> https://www.lexaloffle.com/bbs/?tid=50560 https://www.lexaloffle.com/bbs/?tid=50560 Thu, 08 Dec 2022 18:30:21 UTC my head: <p> <table><tr><td> <a href="/bbs/?pid=121682#p"> <img src="/bbs/thumbs/pico8_empty-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=121682#p"> empty</a><br><br> by <a href="/bbs/?uid=71921"> my_name_is_doof</a> <br><br><br> <a href="/bbs/?pid=121682#p"> [Click to Play]</a> </td></tr></table> </p> <p><a href="https://www.lexaloffle.com/bbs/?uid=49583"> @bikibird</a> for speako-8</p> <p>my head for being empty</p> <p>also the original creator of the meme</p> https://www.lexaloffle.com/bbs/?tid=50446 https://www.lexaloffle.com/bbs/?tid=50446 Thu, 01 Dec 2022 17:44:55 UTC how <p>how to i export a cart as an image</p> https://www.lexaloffle.com/bbs/?tid=50429 https://www.lexaloffle.com/bbs/?tid=50429 Wed, 30 Nov 2022 18:30:30 UTC can i have some help <p>so right now i'm working on a game called raise a thing (raise a floppa clone) and there are some things that i can't find and its these two blocks from scratch</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/71921/Screenshot 2022-11-23 161621.png" alt="" /> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/71921/Screenshot 2022-11-23 161653.png" alt="" /> <p>and these are the two blocks i always use to create save codes and other things</p> <p>so if anyone knows if these exist in pico 8 lua and what they are please tell me</p> <p>another thing is does anyone have a point towards (x,y,sx,sy) function that i can use with credit?</p> <p>what i'm looking for is something that you give the sprites x, y, the x and y you want to point at, and it outputs a direction that can then be put through sine and cosine to be converted into movement</p> <p>i'll credit you in the credits (i'll make a note in the games code to make sure i don't forget)</p> https://www.lexaloffle.com/bbs/?tid=50331 https://www.lexaloffle.com/bbs/?tid=50331 Wed, 23 Nov 2022 21:20:35 UTC