Musikid [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=76900 I closed the IF statement...? <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 _init() chosen = 1 mode = &quot;menu&quot; level = 1 selx = 64 sely = 64 sinceshot = 0 shotx = 64 shoty = 64 cls() end function _update() cls() if mode==&quot;menu&quot; then if chosen==16 then print(&quot;no-scope mode?! 16 ⬆️/⬇️/🅾️&quot;, 1, 1, 11) print(&quot;(x, y) will be provided instead&quot;, 1, 10, 7) print(&quot;warning: extremely difficult!&quot;, 1, 19, 8) else if chosen&gt;10 then print(&quot;novelty crosshair &quot; .. tostr(chosen) .. &quot; ⬆️/⬇️/🅾️&quot;, 1, 1, 10) else print(&quot;crosshair &quot; .. tostr(chosen) .. &quot; ⬆️/⬇️/🅾️&quot;, 1, 1, 6) end end spr((chosen - 1), 60, 60) if btnp(🅾️) then mode = &quot;game&quot; end if btnp(⬆️) then chosen += 1 end if btnp(⬇️) then chosen -= 1 end if chosen&gt;16 then chosen = 16 end if chosen&lt;1 then chosen = 1 end else if mode==&quot;game&quot; then rectfill(o, o, 128, 128, 12) spr(chosen-1, selx, sely) if sinceshot == 0 then spr(64, shotx, shoty, 2, 2) else if sinceshot == 1 then spr(66, shotx, shoty, 2, 2) else if sinceshot == 2 then spr(68, shotx, shoty, 2, 2) else if sinceshot == 3 then spr(70, shotx, shoty, 2, 2) else if sinceshot == 4 then spr(72, shotx, shoty, 2, 2) else if sinceshot == 5 then spr(74, shotx, shoty, 2, 2) end if btn(⬆️) then sely -= 1 end if btn(⬇️) then sely += 1 end if btn(➡️) then selx += 1 end if btn(⬅️) then selx -= 1 end if (btn(❎) and sinceshot&gt;5) then sinceshot=0 shotx = selx shoty = sely else sinceshot += 1 end end 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>Hi! When I try to run this code, I get errors saying I didn't close IF statements that I did close...</p> <p>(namely line 41)</p> https://www.lexaloffle.com/bbs/?tid=52509 https://www.lexaloffle.com/bbs/?tid=52509 Mon, 24 Apr 2023 22:34:22 UTC Weird error message! <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 _init() chosen = 1 cls() end function _update() cls() if chosen==16 then print(&quot;no-scope mode activated! 🅾️&quot;, 12, 1, 11) else if chosen&gt;9 then print(&quot;novelty crosshair &quot; .. tostr(chosen) .. &quot; ⬆️/⬇️/🅾️&quot;, 1, 1, 10) else print(&quot;crosshair &quot; .. tostr(chosen) .. &quot; ⬆️/⬇️/🅾️&quot;, 1, 1, 6) end end spr((chosen - 1), 60, 60) if btnp(⬆️) then chosen += 1 end if btnp(⬇️) then chosen -= 1 end if chosen&gt;16 then chosen = 16 end if chosen&lt;1 then chosen = 1 end 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>With this code, I'm receiving an error at line 23:</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>SYNTAX ERROR LINE 23 (TAB 0) IF CHOSEN&lt;1 THEN CHOSEN = 1 END &lt;EOF&gt; EXPECTED NEAR 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>Isn't the <code>END</code> the EOF?</p> <p>Note: Edited due to a misspelling. Original:</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>SYNTAX ERROR LINE 23 (TAB 0) IF CHOSEN&lt;1 THEN CHOSEN = 1 END &lt;EOF&gt; EXPECTED NEAR END</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> https://www.lexaloffle.com/bbs/?tid=52499 https://www.lexaloffle.com/bbs/?tid=52499 Sun, 23 Apr 2023 22:28:12 UTC