Want to set the same string data type text for different variables, but get an error (more details in post)

So, I set one of the names as “Diana”, like this:

*set Name “Diana”

Then also need to set a first version of the nickname like this as well:

*set nickname1 “Diana”

But I get the error ‘invalid expression: couldn’t express another token’ Is there a way around this? I absolutely need it to be like this because I have like 30 names or so coded this way, and the variations like “Name” “nickname1” “nickname2” will be very important for the game. Some names are coded a bit differently and don’t get an error when chosen like:

*set name “Alexandra”
*set nickname1 “Sasha”

Idk how to go around fixing this. As I mentioned, I need it to be coded this way, because it’s important for the game.

Is it because they are all nickname1, nickname2 for each character? You would need to change the variable names in a way that they don’t overlap. d_name, a_name, d_nickname1, d_nickname2, a_nickname1, a_nickname2 I’m guessing.

1 Like

You see, only the names that have the same string variable text set, get this problem, like:

*set Name “Diana”
*set nickname1 “Diana”
*set nickname2 “Dianka”

*set Name “Alina”
*set nickname1 “Alina”
*set nickname2 “Alinka”

Others that have different text in the nickname1 variable, work just fine:

*set Name “Alexandra”
*set nickname1 “Sasha”
*set nickname2 “Shura”

I think the error might be caused by some other part of the code. I put all three of these block of code into the start of a test project and it runs without errors.

1 Like

Yes, I now noticed that I have different quote marks (pressed ‘’ individually isntead of " pressing double) I fixed it and now it works.