Mistake in Help "Scripting Aliases"?

Posted by Ked on Fri 23 Aug 2002 12:28 PM — 2 posts, 7,574 views.

Russia #0
This is not really a bug... When trying to use World.AddAlias I reffered to the help file provided with MC 3.20 and used the convention from it:

world.AddAlias name, match_text, response_text, parameter, flags, scriptname

It also further provides an example:

World.addalias "teleport_alias", "teleport", "", "&", eEnabled, "DoTeleport"

I've used this as a template for my script, substituting the "&" above for "", however the script refused to execute sending a message with "Invalid type.." (or some such). I then proceeded to check with the function list on your website and it provides a different convention for AddAlias:

long AddAlias(BSTR AliasName, BSTR MatchText, BSTR ResponseText, long Flags, BSTR ScriptName);

I.e. 5 parameters, instead of 6 in the Help file. The website convention seems to work just fine. Just thought you'd like to know of this little problem...

Gratefull user
Australia Forum Administrator #1
Ah yes, the inbuilt help needs updating. The web site is the reference area for script routines.