MQ2DataVars Error

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

Mysteryman
a lesser mummy
a lesser mummy
Posts: 39
Joined: Wed Apr 14, 2004 4:11 pm

MQ2DataVars Error

Post by Mysteryman » Tue Apr 27, 2004 2:49 am

I noticed this piece of code works just fine the first time though

Sub Main
/declare somevalue int outer

/varset somevalue 99

/if (${somevalue}>0) /echo Outer is more then 0

/endmacro
/return


But on the second it's producing an error saying /declare failed. Unless I type in /zapvars. I added teh /endmacro line in there after reading the descripting of zapvars and the line about /endmacro calling it directly. It doesnt' change though. I have to use a /zapvars manually ( or as the first line of my script ) to clear them.

/zapvars
Usage: /zapvars
This takes no parameters, just zaps all OUTER scope variables. /endmacro does this no
matter what, so I might just remove this command altogether. There is no "array" scope
or "timer" scope to tell it to keep.


Also... Since we could pass parms into a function with the following defination...

Sub SomeFunc( p0 , p1 )

Now Should we not be able to use this? ( Yea , I know string is redundent there, Its jsut an example )

Sub SomeFunc( p0 string , p1 string )

I find that If I use the latter, when I pass in 2 arguments, and then test them / try to print them.. I get a value for p0, but p1 would be null everytime. I'm assuming it's making another variable named string in that case as var #2, and then creating a 3rd and 4th


Nothing up there is detremental. Just some little quirks I noticed, which are easily bypassed for now.[/u]

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 » Tue Apr 27, 2004 3:36 am

All of your concerns are taken care of in the next zip :)

thank you, next in line please ;)

seriously now. Yeah the outer scope wasnt being cleared ever, so I fixed that, removed the "keep vars" crap, and removed /zapvars when MQ2DataVars is enabled. It's not necessary anymore because of the 3 different scopes now.

Parameters having specified data types is implemented next zip. You put the type BEFORE the variable name, like
Sub SomeFunc(string p0,int p2)
.. and these cannot have default values.

extra spaces might cause problems though sorry
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

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 » Tue Apr 27, 2004 5:18 am

this is up currently, in the 20040427 zip. enjoy
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

Mysteryman
a lesser mummy
a lesser mummy
Posts: 39
Joined: Wed Apr 14, 2004 4:11 pm

Post by Mysteryman » Tue Apr 27, 2004 11:05 am

Danka!