View Single Post
  #8  
Old 10-28-2005, 05:51 AM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
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.
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote