Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Jscript ➜ Eroor message.

Eroor message.

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Stratus   (25 posts)  Bio
Date Tue 03 Sep 2002 12:51 AM (UTC)
Message
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.

Trust me, Diet Coke isn't nearly as good as regular.
-Stratus
Top

Posted by Stratus   (25 posts)  Bio
Date Reply #1 on Tue 03 Sep 2002 01:12 AM (UTC)
Message
(Note: I realize I could just make a trigger, "Hello, %1. How are you today?, but I'm just practicing with JScript right now.)

Trust me, Diet Coke isn't nearly as good as regular.
-Stratus
Top

Posted by Nick Gammon   Australia  (23,169 posts)  Bio   Forum Administrator
Date Reply #2 on Tue 03 Sep 2002 02:42 AM (UTC)
Message
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

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Stratus   (25 posts)  Bio
Date Reply #3 on Tue 03 Sep 2002 03:19 AM (UTC)
Message
Oh man, I can't believe I didn't figure that out. Heh, thanks Nick. ^.^

Trust me, Diet Coke isn't nearly as good as regular.
-Stratus
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


15,625 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.