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):
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);
}