MQDataVars scopes

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

MQDataVars scopes

Post by Rusty~ » Mon Apr 26, 2004 11:15 pm

was playin around converting all my macros to use the new variable system today and ran into some problems. it seems no matter what i set the scope for a variable as, it always asks like a "global". ie, if i declare something as a local or outer, the variable doesn't get deleted when macro ends, and if i try to run it again it gives me errors when it gets to the /declare statements (since the variables exsist.... so i hadda add in Define[] checks to get it to work.

another problem i have found is with strings. not sure if its an error or not, but i had some errors with setting strings to string type variables using quotation marks. for example:

Code: Select all

/declare myVar string local
/varset myVar "test"
/echo ${myVar}

/if ( ${myVar.Equal[test]} ) {
 /echo equal
} else {
 /echo not equal
}
the output is:
"test"
not equals
it includes the quotes as part of the string

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Mon Apr 26, 2004 11:30 pm

yes dont use quotes in your varset unless you want the quotes in your variable ;)

I'll check on the variable scopes, but in testing it worked properly.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Mon Apr 26, 2004 11:46 pm

Everything is working fine as is Lax. I have my biggest macro completely done. Like you said, I stumbled on the /varset quotes thing but I like the way it works now. No need to put those silly things on all lines with spaces.