Need help with a macro you are writing? Ask here!
Moderator: MacroQuest Developers
-
JWWQ
- a lesser mummy

- Posts: 30
- Joined: Sat Jun 19, 2004 4:58 pm
Post
by JWWQ » Mon Jun 21, 2004 6:36 pm
Perhaps it's because the answer is so painfully obvious.
Perhaps it's because all programmers already know how to use it.
Perhaps it's because I am a moronic newb - Easy, tiger.
I see the @ sign in alot of macros in the boards and I am having trouble following its use, necessity, and attributes.
I poured over Wassup's EXCELLENT help file 'readme.chm' but it is not to be found there either(yet).
Could someone give me an easy explanation and perhaps an example?
heh--try searching for '@' in the search here.
Where can I find out stuff like this?
-
Drumstix42
- a grimling bloodguard

- Posts: 808
- Joined: Mon May 03, 2004 4:25 pm
Post
by Drumstix42 » Mon Jun 21, 2004 7:34 pm
I did find this out of one of Lax's posts in the Announcment section:
MQ2Data was designed so that variables could also very easily use the same system. The way
MQ2DataVars works overall is to use variables as MQ2Data Top-Level Objects. Instead of
@Param1, you would use ${Param1} to access the variable. Each variable has a type, and in
this case Param1 is a string so you could use any member of the 'string' type directly from
the variable. So instead of ${String[@Param1].Length} to determine the length of the
parameter, you simply ${Param1.Length}.
-
loadingpleasewait
- a snow griffon

- Posts: 332
- Joined: Sat Sep 14, 2002 8:46 am
Post
by loadingpleasewait » Tue Jun 22, 2004 1:25 am
@ used to be how MQ would recognize custom variables.
example: @myvar1
However since the inclusion of MQ2DataVars, @ is now obsolete and replaced with ${}
example: ${myvar1}
If you find a macro that still has @ variables in it, it needs to be updated in order to work. Hope this helps. :)
-
JWWQ
- a lesser mummy

- Posts: 30
- Joined: Sat Jun 19, 2004 4:58 pm
Post
by JWWQ » Tue Jun 22, 2004 10:23 am
*note to self* Read all announcement boards before making an ass of myself.
You will be happy to know, though, that with your simple answer, I have converted and enhanced DriftSupra's Dumpster diver!
Thanks a Mil!
Remember that feeling when you were a young programming newb just starting to show first buds!
-
Drumstix42
- a grimling bloodguard

- Posts: 808
- Joined: Mon May 03, 2004 4:25 pm
Post
by Drumstix42 » Tue Jun 22, 2004 3:51 pm
At least you approched the issue correctly.