Quote:
|
Originally Posted by jake13jake
Actually stefan, should scripted line breaks really be read as string line breaks when you can just do:
say2("Hello!\n"
+ "This is the next line.");
??
|
Okay, few things here.
1) Stefan made GS1 and GS2, I'd assume he knows exactly what he's talking about regarding GraalScript, and I'd be supprised if someone corrected him on something completely wrong.
2) The character you want to use is '@', not '+'. The addition character treats both the strings as numbers and then tries to add them. I'm believing since both the strings are not NULL, you'll get a message saying '2'.
3) Scripted line breaks
are string line breaks, but the only exception is that the line break is contained within the string. (Someone correct me on this, mmkay?)
I'd say use Stefan's idea for big, long messages, and use the "string\nstring" idea for shorter messages. The NPCServer's sendpm on a player's login uses Stefan's idea, typically, although I think I've seen it done the other way. I don't remember.
Anyway, use whichever way you please: either contain a line-break within the quotes, or contain a \n within the quotes. Up to you.