[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Problem calling script from an alias

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Problem calling script from an alias

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Vink   (7 posts)  [Biography] bio
Date Sat 03 Nov 2001 08:43 PM (UTC)  quote  ]
Message
in my auto-target setup i an alias

Alias: target *
Send:
Enabled: checked
All other options: unchecked
Label: Target_Alias
Script: OnAliasTarget

and in my script file

sub OnAliasTarget (thename, theoutput, thewildcards)
world.setvariable "target", thewildcards (1)
world.note "Victim set to " & thewildcards (1)
end sub


and another alias

Alias: b
Send: backstab @target
Enabled: checked
Expand variables: checked
All other options: unchecked


when i type "target man"
it should send the message "Victim set to man"
but it does not
when i type "b" it should backstab man, but i get a popup
box that says variable target not defined

why doesn't it work?
[Go to top] top

Posted by Nick Gammon   Australia  (18,772 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sun 04 Nov 2001 04:20 AM (UTC)  quote  ]
Message
I tried what you did and it worked OK.

Your problem with the second alias is that the first one didn't work and set the variable, why I don't know.

Do you have scripting enabled, and the appropriate script file in the "Script file" box in the scripting configuration tab?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (18,772 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Sun 04 Nov 2001 04:44 AM (UTC)  quote  ]
Message
Also, be cautious when typing in the alias that you don't slip in an extra, unnoticed, space.

For example, this won't work:


target *(space)


or


target(space)(space)*



- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Vink   (7 posts)  [Biography] bio
Date Reply #3 on Sun 04 Nov 2001 03:58 PM (UTC)  quote  ]
Message
yep i didn't have scripting enabled, i assumed it was automatically enabled for some reason
*whap me*
thanks nick
[Go to top] 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.


1,467 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]