using 0.2.5 e
Game running fine - found through splore, runs fine in editor
Game page: https://www.lexaloffle.com/bbs/?tid=34952
-Produces <EOF> error when running on web
" error line 23 (tab 2)
camera(scr.x, scr.y)
<'eof'> expected near 'end' "
I have read similar post where web exports won't run
games made in previous version of the editor, however
I have attempted to export again from latest version
and experience the same problem running on the BBS
(preview), so feel the bug must be rudimentary/code based.
Essentially the error stems from calling a function within a function
(not within an if or else statement), however when I remove
the above function call, the same error is produced by the previous line
(within the scope of an if, else statement) [[function camera_pos()]]
Could this be as simple as 'cascading' unclosed function error?
Any help much appreciated as I would very much like to continue this
project (and obviously avoid similar bugs moving forward)
Thanks
I can see the same error in the web editor with version 7 of the cartridge.
There is a stray ]]
in tab 2, but removing it doesn’t fix.
I suspect that it’s tab 1 that’s missing an end
or having an extra one. It’s hard to see because the tab is not using usual indentation! (add one space or tab for each new function/if/for/etc block, remove one for each end).
There was a change in the way comments within multi-line comments are handled in the latest version, which given what merwok found with some stray ]] appearing could be the problem. This is a previous thread on that issue: https://www.lexaloffle.com/bbs/?tid=52084
Okay, so just a follow up for anyone who may be experiencing similar error with attempting to run an uploaded cart since ver 0.2.5e, I've tried removing all multi-line comments from the code '--[[ --]]' and this has reproduced the same error previously produced upon web export, however with the added string value info :
SYNTAX ERROR LINE 23 (TAB2)
CAMERA(SCR.X,SCR.Y)
<EOF> EXPECTED NEAR 'END'
RUNTIME ERROR
ATTEMPT TO CALL A STRING VALUE
This suggests to me I am least one step closer to resolving
what exactly is producing the error in this instance,
and now I presume I won't have to re-upload to test each time I make a
change! stay tuned.. or not x)
[Please log in to post a comment]