Non-existent variable ''


#1

Has anyone run across this error before?:

Non-existent variable ‘’

I don’t have any variables that are named " (quote marks)

Actually, the game won’t let you create the variable " because it wants you to start variables with a letter.


#2

Please include the problematic code in your post.


#3

I fixed it. :+1:

Problematic code:

*if (s1c != "")
 *set {s1c} +1

While the above works in game, Quicktest does not like "" variables.
What I mean by that is the variable s1c is defined in startup.txt like this:

*create s1c ""

So when Quicktest went to {s1c}, it could not find a variable, hence the Non-existent variable ‘’ error
I resolved this by creating s1c differently, and by adding an otherwise unnecessary variable:

*create s1c "z"
*create z 0

It passes Quicktest now, and gameplay is unaffected by the extra variable.
The final code is:

*if (s1c != "z")
 *set {s1c} +1

#4

What is wrong with just doing *set sc1 + 1? There is no need for an indirect reference via {} here.