${If[condition,true,false]} not working properly, True 100%

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

n00bhaxor
a lesser mummy
a lesser mummy
Posts: 58
Joined: Fri Jun 05, 2009 4:53 pm
Location: Dallas, TX

${If[condition,true,false]} not working properly, True 100%

Post by n00bhaxor » Tue Dec 20, 2016 12:05 pm

I have some aliases with ${If} statements inline and they always default to true now. This has been since the latest patch or maybe the last patch, but I know it was working before that.

I will break these out into a sub-routine and get rid of the single line until this is fixed.

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Re: ${If[condition,true,false]} not working properly, True 1

Post by SwiftyMUSE » Tue Dec 20, 2016 12:19 pm

Examples?
PayPal: Donate to SwiftyMUSE
Bitcoin: 1LuQ6YcEAWxF3fm9yWMiro4K582je7364V
Krono: PM me

dont_know_at_all wrote:Gee, if only there was a way to correctly report a crash...

n00bhaxor
a lesser mummy
a lesser mummy
Posts: 58
Joined: Fri Jun 05, 2009 4:53 pm
Location: Dallas, TX

Re: ${If[condition,true,false]} not working properly, True 1

Post by n00bhaxor » Tue Dec 20, 2016 4:30 pm

Sorry here ya go:

Code: Select all

/squelch /alias /usefellowship /multiline ; /varset changetoini 1 ; ${If[${UseFellowship}==1,/varset UseFellowship 0,/varset UseFellowship 1]} ; /echo Toggling Fellowship Usage to ${If[${UseFellowship}==0,OFF,ON]}
	/squelch /alias /holdcamp /multiline ; /varset changetoini 1 ; ${If[${AlwaysHoldCamp}==1,/varset AlwaysHoldCamp 0,/varset AlwaysHoldCamp 1]} ; /echo Toggling Always Hold Camp to ${If[${AlwaysHoldCamp}==0,OFF,ON]}
	/squelch /alias /instantrelease /multiline ; /varset changetoini 1 ; ${If[${InstantRelease}==1,/varset InstantRelease 0,/varset InstantRelease 1]} ; /echo Toggling Instant Release when dead to ${If[${InstantRelease}==0,OFF,ON]}
	/squelch /alias /qmgroup /multiline ; /varset changetoini 1 ; ${If[${QMGroup}==1,/varset QMGroup 0,/varset QMGroup 1]} ; /echo Toggling Quiet Miracle on Group to ${If[${QMGroup}==0,OFF,ON]}

demonstar55
a snow griffon
a snow griffon
Posts: 314
Joined: Fri Nov 28, 2008 6:31 am

Re: ${If[condition,true,false]} not working properly, True 1

Post by demonstar55 » Tue Dec 20, 2016 4:45 pm

you need to add /noparse in front of /alias I believe.

n00bhaxor
a lesser mummy
a lesser mummy
Posts: 58
Joined: Fri Jun 05, 2009 4:53 pm
Location: Dallas, TX

Re: ${If[condition,true,false]} not working properly, True 1

Post by n00bhaxor » Fri Dec 30, 2016 10:08 am

Demonstar you were spot on with this fix. That was the issue.

Without /noparse it was using the value of ${variable} in the alias when created.