This repository was archived by the owner on Oct 24, 2020. It is now read-only.
forked from picolove/picolove
-
Notifications
You must be signed in to change notification settings - Fork 12
Error: 'then' expected #23
Copy link
Copy link
Open
Description
Does picolove not support the one-liner if?
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==1 and #menu or menu_selection-1I 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.
Metadata
Metadata
Assignees
Labels
No labels