[XP] Message Choice Window

Started by ForeverZer0, August 06, 2010, 12:27:55 pm

Previous topic - Next topic

ForeverZer0

I don't script anymore, nor really even update my old scripts, but you can solve it with a script call. After the script call for the choices, just add an extra line: "Input.update".
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Zangetsu

Sorry for necroposting...

But if anyone can help me out there, I get a syntax error when trying to add a choice with an apostrophe in, as if I want to write "I don't know" as one of the choices, the script won't let me. I get that it's a scripting thing, but is there any way to override this without making my choices seem awkwardly phrased?

Many thanks to anyone who can help.
My name is Kitsuki.

ArcaneAlchemy

Quote from: Zangetsu on June 28, 2014, 02:26:32 am
Sorry for necroposting...

But if anyone can help me out there, I get a syntax error when trying to add a choice with an apostrophe in, as if I want to write "I don't know" as one of the choices, the script won't let me. I get that it's a scripting thing, but is there any way to override this without making my choices seem awkwardly phrased?

Many thanks to anyone who can help.


Well, the apostrophe is usually used to declare strings in most programming languages. What's happening is that the program is thinking that you're trying to end the string literal at the second apostrophe. If they don't match, you'll get that syntax error as well. Now I don't know if this is gonna help but try this.

puts "I don\'t know"

the forward slash is used to ignore the apostrophe it is followed by and continue with the string. http://en.wikibooks.org/wiki/Ruby_Programming/Strings
"Wait? Do I look like a waiter?" -Kefka

G_G

This would be pointless.

puts "I don\'t know"

Since you start and end the string with double quotes, you don't have to escape single quotes and vica versa.

'I don\'t know'

Or

"Welcome to my...\"home\"...if you can call it that!"

You can have "It's fine!" And 'It felt "weird" seeing him again'

Chances are you're putting 'I don't know'. To fix it, simply do 'I don\'t know' or "I don't know". Either way should work.

ArcaneAlchemy

Oh lol, just tried double quotes. You're right. Wow, I don't know why I thought that.  :facepalm:
"Wait? Do I look like a waiter?" -Kefka

Zangetsu

Thanks so much, guys :D This helps a whole bunch.

Once more question, is there any way to centre the text IN the choices? Not centre the message window itself, but the choice's text. Thanks!
My name is Kitsuki.

Zangetsu

Sorry for necroposting once more... I've been using this script a lot lately, therefore I've had some time to explore and find some weird spots in my games concerning it. And being useless in coding, I wouldn't be able to fix this problem on my own no matter what I do. That's why I'm posting here.

Here's the thing: When I show a picture and call the script, the choices don't show up. At first I thought I didn't draw up the choices, but when I used the up and down arrow keys, I could hear the sound of the cursor moving from choice to choice. So it's there--it's just that the picture (which, by the way, is the size of the game window) and completely obscures it. I guess overlay is the word?

How can I fix it and get the choices to come out on top?

Thanks in advance to anyone who can help!
My name is Kitsuki.