Metis - Guide 2 - VariablesVariables
When you script with Metis, especially when you get a bit deeper, you will realise that soon you will want to store bits of information without having to save them to a file. This can be done using variables. There are 2 types, 'Dynamic
' and 'Static
I am not going to go into detail on the Static ones as there are pretty good explanations in the Metis help file.
But basically they are named variables that contain information that changes dependant on the user but always contain the same type of information.
For example in our previous command we used %NAME%. This is a static variable as ,although it picked up my name in a room if another user tried it, Metis would pick up their name instead. But it will always be their name
As for Dynamic variables, they are user-specific, i.e. they are created, changed and deleted by the user/host.
There are 2 ways to display these types. Either surrounded by $'s
or using a similar format as the Static ones %USERVAR[MyBirthday]%
These Dynamic variables ARE
case-sensitive, so $NAME$ and $name$ are not the same thing.Creating, Editing and Deleting Variables
This is known as pushing and popping variables. Think of it as this. You push information into a variable to store it, much as you do with a refrigerator, and you pop a balloon to destroy it.
For example, <out type="push" extdata="MyBirthday">11/08/1986</out>
The variable %USERVAR[MyBirthday]%
now contains the information I have entered,<out type="pop" extdata="MyBirthday"> </out>
But now I have popped the variable %USERVAR[MyBirthday]%
so it now has no value at all.
That's it. Variables are that easy really. Read on for the next section.
©2005-2023 WinMXWorld.com. All rights reserved. Page last updated Sun Dec 14 2008