Syntax error unexpected token var

● ARCHIVED · READ-ONLY
Started by Eraine 3 posts View original ↗
  1. Hello,


    I've been trying to find topics on syntax errors, but couldn't find any that match the error I'm getting. Whenever I testplay my game and call up the common event "sleep" (which resets some NPC positions and gathering resources) I get a "syntax error unexpected token var". Before, the common event worked fine. I've taken out some of the more complicated events I did since then, disabled the plugins I added since then, but keep getting this error. I will include screenshot of the error report below.


    I also replaced the mentioned .js files with ones from a new (empty) project and that help either. I haven't messed with the code, I am no scripter. I hope someone can help me fix this!


    Thanx in advance!

    Syntaxerror161004.png
  2. Please show a screenshot of the common event itself - most likely you used a script command inside that common event, and have made a syntax error inside that script command.


    Because the error comes from the game interpreter that handles the event commands, and the script box is the only place where you might have made a syntax error.
  3. Oh, fixed it!


    The common event didn't have any scriptcalls, but it activated another common event that had, and I somehow messed that up by copying the scriptcall I used there.


    Andar, thank you for pointing me in the right direction!