Eroor message.

Posted by Stratus on Tue 03 Sep 2002 12:51 AM — 4 posts, 16,768 views.

#0
Ok, in the muck that I play to send text to the world instead of say commands, you have to use a " . So that makes it a little difficult when it comes to scripting.
Ok, here's the script that I made:

function OnHi (thename, theoutput, thewildcardsVB)
{
var Name
Name = world.GetTriggerInfo (thename, 101)
world.send (""Hello, " + Name + ".")
} //end of OnHi

It gives me this error:
-2146827282
Execution of line 12 column 14
Expected ')'
Immediate execution

Does anybody have a clue how I could send this to the muck with it actually stating on the game? It works with one " but it only sends it to the world, it doesn't actually say it for everyone to see.
#1
(Note: I realize I could just make a trigger, "Hello, %1. How are you today?, but I'm just practicing with JScript right now.)
Australia Forum Administrator #2
Certain special characters, like quotes, need to be preceded by backslash. Try this:


function OnHi (thename, theoutput, thewildcardsVB)
{
var Name;
Name = world.GetTriggerInfo (thename, 101);
world.send ("\"Hello, " + Name + ".");
} //end of OnHi
#3
Oh man, I can't believe I didn't figure that out. Heh, thanks Nick. ^.^