Register forum user name Search FAQ

Gammon Forum

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 ➜ General ➜ Variables not accessible?

Variables not accessible?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Faedara   (106 posts)  Bio
Date Tue 16 Nov 2010 12:53 PM (UTC)
Message
I think I've run into a bug, but I think I might just have things mixed up. What I want should be fairly simple, and I've done it before easily, but I forgot how I did it. Basically I'm setting up an alias attack system, using a group of variable setting alias and a set of attacking alias.

I have, what I believe to be, a fairly simple way of doing this, including a test to see if all's working right:


<aliases>
<alias
match="^EE (.*?)$"
enabled="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>SetVariable ("E", "%1")
ColourNote ("red", "black", "E = %1")</send>
</alias>
</aliases>


Which sets the variable E to whatever was typed after "EE" such as "EE goblin"


<aliases>
<alias
match="^TAR$"
enabled="y"
expand_variables="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>ColourNote ("red", "black", "E = ", E)</send>
</alias>
</aliases>




This is the code that I remember using before to call up a list of variables, by entering multiple lines of colournotes, what am I doing wrong?

The eternally clueless <3
Currently looking for a mentor/tutor to help me learn everything about Lua from the ground up. I can't understand 28*41 until I learn what causes 2+2.
Top

Posted by Fiendish   USA  (2,536 posts)  Bio   Global Moderator
Date Reply #1 on Tue 16 Nov 2010 04:51 PM (UTC)
Message
If you're going to use setvariable, I think you need to use getvariable.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #2 on Tue 16 Nov 2010 07:47 PM (UTC)
Message
Fiendish is correct. You are mixing two variable types, client and scripting. Either do this:


SetVariable ("E", "%1")

--

ColourNote ("red", "black", "E = " .. GetVariable ("E"))



or:



E = "%1"

--

ColourNote ("red", "black", "E = " .. E)


- 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.


11,800 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.