Couldn't extra token error


#1

Okay I got the error:
startup line 98: Invalid expression, couldn’t extract another token: “nathan”

This is the code:

*choice
#Nathan
You sure you didn’t slip your pencil. That rubber is there if you need it?
*set name “nathan”
*choice
#Yeah it’s ${name}
Cool.
*goto question

I’ve read a few other posts about this but I couldn’t find anything to fix this issue.
Does anyone have a clue? Thanks


#2

I’m a bit confused as to which is the answer/which is the question? You have “* choice” (ignore the space for forum formatting) in there twice? If “Nathan” and “Yeah it’s {name}" are the two choices possible for one question, you only need to put the * choice command at the beginning of the options list, otherwise it's confused and thinks the second answer is another question with only one answer. You should have a "*goto [you know, name of whatever part is next]" at the end of your first choice instead, like you did under "Yeah it’s {name}.”

*choice
 #Nathan
  You sure you didn’t slip your pencil. That rubber is there if you need it?
  *set name "nathan"
  *goto question
 #Yeah it’s ${name}
  Cool.
  *goto question

EDIT: for command confusion, should be clearer now


#3

Are you using smart quotes? Smart quotes aren’t allowed.


#4

It reads as though you are trying to have the player choose a name and then choose if they are happy with that name…

E.g:

*label start
*choice
	#Nathan
		*set name “nathan”
		*goto choices
	#Bob
		*set name "bob"
		*goto choices
*label choices
You sure you didn’t slip your pencil. That rubber is there if you need it?
*choice
	#Yeah it’s ${name}
		Cool.
		*goto question
	#Nope, that's not me
		*goto start
*label question

Although it may be easier you to use something like:

*label start
What is your name?
*input_text name
You sure you didn’t slip your pencil. That rubber is there if you need it?
*choice
	#Yeah it’s ${name}
		Cool.
		*goto question
	#Nope, that's not me
		*goto start
*label question