Variables not accessible?

Posted by Faedara on Tue 16 Nov 2010 12:53 PM — 3 posts, 14,834 views.

#0
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?
USA Global Moderator #1
If you're going to use setvariable, I think you need to use getvariable.
Australia Forum Administrator #2
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)