You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.
Error: Error loading lua: patrick.p8:75: 'then' expected near 'menu_selection'
stack traceback:
[string "boot.lua"]:637: in function <[string "boot.lua"]:633>
[C]: in function 'error'
cart.lua:429: in function 'load_p8'
main.lua:140: in function '_load'
main.lua:348: in function 'load'
main.lua:719: in function <main.lua:711>
[C]: in function 'xpcall'
[string "boot.lua"]:650: in function <[string "boot.lua"]:639>
[C]: in function 'xpcall'
Here's line 75:
if (button==4) menu_selection=menu_selection==1and#menuormenu_selection-1
I tried to replace it with a full if/end block but that just made it complain on another similar line.
OK, sorry, it's obviously supported, just not fully.
It supports multiple statements and an else branch, but apparently it doesn't support the same kinds of statements in its body as PICO-8. In this case, it seems that it fails to parse a one-line if body that has a ternary boolean statement. All others seem to work fine.
Does picolove not support the one-liner
if
?Here's line 75:
I tried to replace it with a full
if
/end
block but that just made it complain on another similar line.The cart in question is here on GitHub, but I have the same problem with all my carts since I use the same boilerplate menu system.
The text was updated successfully, but these errors were encountered: