Text Variables not accepting Backslash

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Saruto
Posts: 24
Joined: Sat May 09, 2015 2:21 pm

Text Variables not accepting Backslash

Post 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.
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Text Variables not accepting Backslash

Post 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.
Saruto
Posts: 24
Joined: Sat May 09, 2015 2:21 pm

Re: Text Variables not accepting Backslash

Post by Saruto »

Yup, looks like it works now!

Thanks again, Tony!
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Text Variables not accepting Backslash

Post by Tony Li »

Happy to help!
Post Reply