Page 1 of 1

Text Variables not accepting Backslash

Posted: Mon May 02, 2016 2:58 pm
by Saruto
I want to have a character say a random line of dialogue every time they're talked to. So, I made a Dialogue System text variable and formatted in such a way so that I can throw it in the RandomElement function. This all worked, but then I wanted to add some of the RPGMaker pause codes in some of the random lines. When I tried to add them in the Initial Value entry box, the game immediately threw an exception: 'Code has syntax errors: Line 2, Col 1 : Failed to parse Letter of Name.' It seems like the code cannot parse the backslash character when initializing the variable.

Can Dialogue System variables absolutely not accept the backslash character? I can think of a few ways to work around this, but it doesn't seem like intended behavior so I'd figure I'd mention it.

Re: Text Variables not accepting Backslash

Posted: Mon May 02, 2016 3:07 pm
by Tony Li
Try using two backslashes in the Initial Value. For example: "This is a \\, pause."

I'm out of the office at the moment, so I'm afraid I'm not able to test this comprehensively right now. But I wanted to at least give you what I think should be a solution.

Re: Text Variables not accepting Backslash

Posted: Mon May 02, 2016 4:19 pm
by Saruto
Yup, looks like it works now!

Thanks again, Tony!

Re: Text Variables not accepting Backslash

Posted: Mon May 02, 2016 4:33 pm
by Tony Li
Happy to help!