It would help to see the 'exact' script you are trying to use. Sounds like you are incorrectly defining something in the script and it is complaining because the array 'wildcards' doesn't actually exist. Without showing us the exact code you are trying to use, we are flying blind here.
However I suspect you are doing something a bit silly. The procedure you call needs to be like:
function SaveBadGuy (name, output, wildcards)
{
world.send(wildcards(1));
}
If you defined the routine this way, then I haven't a clue why it doesn't work. One thing to note though is that the names: name, output and wildcards are 'your' names, not ones that the script engine or mushclient automatically uses. For all anyone knows mushclient thinks they are xyzzy, ziggy and glug. You have to make sure that the number of them are the same as what mushclient expects and it helps to have them be something you understand, but they can be anything you want. In your case 'if' you defined the script like above, then it should have worked as expected.
Note however that since sending the contents of the wildcard 'to' the mud is quite silly, you probably should have used 'world.note(wildcards(1));', which displays it in output, but doesn't try to send it to the mud itself. |