prigs7 [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=77183 Help, Error <p>I'm getting an error.</p> <p><em><br /> SYNTAX ERROR LINE 19<br /> PLAYER.SP=2<br /> UNCLOSED FUNCTION<br /> </em></p> <p>I can't figure it out and here's my code.</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 _init() player={ sp=1, x=59, y=59, w=1, h=1, flp=false, speed=2, walking=false } end function _update() move() if walking==true then player.sp=2 end else then player.sp=1 end end function _draw() cls() spr(player.sp,player.x,player.y,player.w,player.h,player.flp) end function move() if btn(0) then player.x-=player.speed player.walking=true end else if btn(1) then player.x+=player.speed player.walking=true end else if btn(2) then player.y-=player.speed player.walking=true end else if btn(3) then player.y+=player.speed player.walking=true end else player.walking=false 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> https://www.lexaloffle.com/bbs/?tid=52619 https://www.lexaloffle.com/bbs/?tid=52619 Wed, 03 May 2023 23:21:13 UTC