Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Unexpected Token Error?

So I'm very new to Twine and I'm using it in an extremely basic way for a project I'm doing. I'm using the game to display connections between data in a database, so literally it's just a network of links between passages. There are no variables, literally just links.

I just tried to test my game, and I got an "unexpected token is illegal" error. I'm not sure how to go about troubleshooting this--I've reset the start point of the game to various different passages, and I can't imagine what could be causing this.

I figured it has something to do with a Javascript error, like a weird character or something, but I'm not sure how to go about finding it. There are too many passages to go through each one and check for mistakes (I have 760 passages), and many of my passages are completely empty anyway and have just been created through links in other passages.

I'm running Twine 2.0.10 and using Harlowe 1.2.1. Any idea what could be causing this? Please let me know if theres' any other information you need--I'm very new to all of this and don't really know what I'm doing!

Comments

  • edited March 2016
    My first guess would be that your Story either has Passage Names with an illegal character in them (don't use punctuation or meta-characters) or that the contents of the first passage contains an illegal character(s) in it which needs to be parsed by Javascript using Regular Expressions to be shown so if there are illegal character(s) then you could get the error message you saw.

    Would you be willing to use the Archive option to make a backup file of your Story Projects, then upload a copy of that backup file to a file hosting site of your choice (eg. Dropbox, Google Drive, OneDrive, Mega, etc...) and supply a link to the uploaded file (either via a post or a Personal Message) so that someone can debug it for you.
  • greyelf wrote: »
    My first guess would be that your Story either has Passage Names with an illegal character in them (don't use punctuation or meta-characters) or that the contents of the first passage contains an illegal character(s) in it which needs to be parsed by Javascript using Regular Expressions to be shown so if there are illegal character(s) then you could get the error message you saw.

    Would you be willing to use the Archive option to make a backup file of your Story Projects, then upload a copy of that backup file to a file hosting site of your choice (eg. Dropbox, Google Drive, OneDrive, Mega, etc...) and supply a link to the uploaded file (either via a post or a Personal Message) so that someone can debug it for you.

    I could send it to someone via personal message. I can't make the link public because it contains data that I don't want to share with the world. But yeah, if you or someone else were willing to debug it for me I would be eternally grateful!!!!!
  • PM me and I will have a look at it
  • The issue was caused by having uncommented plain text within the Story Javascript area, which was fixed by wrapping the plain text within a /* and */ to mark it as a comment.
    eg.
    /*
    This is plain text and needs to be marked as a comment so that Javascript will ignore it.
    */
    
Sign In or Register to comment.