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
➜ Functions Fail After One Use, Succeed Upon Script Reload
|
Functions Fail After One Use, Succeed Upon Script Reload
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Krizykronz
(2 posts) Bio
|
| Date
| Fri 03 Dec 2004 05:15 PM (UTC) |
| Message
| When I execute a function via an alias in MUSHclient, it succeeds once, but chokes the second time. I am completey baffled.
Error number: -2146823286
Event: Execution of line 1 column 1
Description: Function expected
Line in error:
Called by: Immediate execution
Here's the code (no line numbers, since there were no line numbers in the error message):
var afk_message;
var afk;
function afk()
{
afk = world.GetVariable("afk");
if (afk == "true")
{
world.SetVariable("afk", "false");
afk = world.GetVariable("afk");
}
else
{
world.SetVariable("afk", "true");
afk = world.GetVariable("afk");
}
world.send("afk");
world.note(afk);
}
| | Top |
|
| Posted by
| Krizykronz
(2 posts) Bio
|
| Date
| Reply #1 on Fri 03 Dec 2004 06:06 PM (UTC) |
| Message
| | Hm, okay. Didn't realize that I couldn't have a function name that was the same as a variable name. I'm in Java mode. Hope a moderator deletes this topic soon. How embarrassing. :) | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #2 on Fri 03 Dec 2004 08:04 PM (UTC) |
| Message
| | You can delete your own posts you know, but I rather you didn't, since this may happen to someone else one day. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | 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.
13,497 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top