Code: Select all
/if ( !${Defined[timeFrame]} ){
/echo No TimeFrame value Specified. Assuming Seconds
/varset timeFrame s
}
Is there something wrong with the syntax?
thnks..
Moderator: MacroQuest Developers

Code: Select all
/if ( !${Defined[timeFrame]} ){
/echo No TimeFrame value Specified. Assuming Seconds
/varset timeFrame s
}
Code: Select all
/if (!${timeFrame}) {
/echo No TimeFrame value Specified. Assuming Seconds
/varset timeFrame s
}${Defined[]} Just checks for the variable being declared.BlackTooth wrote:This is an if statement in a macro that I am working onFor some reason I get an error when I run the macro ingame....Code: Select all
/if ( !${Defined[timeFrame]} ){ /echo No TimeFrame value Specified. Assuming Seconds /varset timeFrame s }
Is there something wrong with the syntax?
thnks..
Code: Select all
/varset timeFrame sCode: Select all
/declare timeFrame string local s
Code: Select all
/if (${Defined[timeFrame]}) {
/varset timeFrame s
} else {
/declare timeFrame string global s
}