/newif Parse bug?

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

/newif Parse bug?

Post by LordGiddion » Sat Apr 10, 2004 9:01 pm

This works and appears to function correctly

Code: Select all

/newif !@DoArchery  {
and so does this

Code: Select all

/newif (@DoArchery==0) && (@Combatstatus) {

but this fails and comes back as couldn't parse && (0) (note execution doesn't end it contnues)

Code: Select all

/newif (!@DoArchery) && (@Combatstatus) {

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

Post by ml2517 » Sat Apr 10, 2004 9:04 pm

Not at a pc right now but try pressing them together and surrounding them.

Code: Select all

/newif ((!@DoArchery)&&(@Combatstatus)) { 

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

Post by LordGiddion » Sat Apr 10, 2004 9:19 pm

Interesting

Code: Select all

/newif (!@DoArchery)&&(@Combatstatus) {
Fails and the error is couldn't parse "&(0) {" notice the the error turns from && to &

but

Code: Select all

/newif ((!@DoArchery)&&(@Combatstatus)) {
Works seemingly 100% correct

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 » Sat Apr 10, 2004 11:30 pm

I'll look into that, ! might be killing an extra part or something
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 » Sat Apr 10, 2004 11:32 pm

oh and, this isnt a /newif bug it has nothing to do with /newif. It has to do with Calculate. *repeats himself a few more times* . . /echo ${Math.Calc[your conditions]} will tell you the same thing its telling /newif.

/newif just calculates your conditions. ;)

anyway I'll get on that tomorrow
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

Post by LordGiddion » Sun Apr 11, 2004 7:50 am

Sorry Lax, I've heard you say the Calculate vs/ Newif thing a few times but I thought you were activly pounding at both so I figured I just say where I saw it rather then confusing a bunch of people by calling the post calculate formating and having /newif examples.

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 13, 2004 6:57 am

Okay, did some testing and found... the problem has to do with your spaces!
"Couldn't parse <whatever>" is what is said when you try to execute a command that doesnt exist.

/newif (1) && (1) /echo hi
Couldn't parse '&& (1) /echo hi'

/newif ((1) && (1)) /echo hi
[MQ2] hi

So if you're going to use spaces, you do need to use parentheses around the whole thing ;) We could require parentheses in /newif... hmm..

So it was actually a /newif (and the same thing would happen with /if actually) issue. But, I did find an issue with ! during my testing.

${Math.Calc[!0&&1]} => 0 (incorrect)
${Math.Calc[(!0)&&(1)]} => 1 (correct)
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 » Tue Apr 13, 2004 9:01 am

Just require parenthesis and work on real problems :D