Page 1 of 1
Return values
Posted: Thu Sep 02, 2004 7:23 pm
by Nueder
I am using spell_routines.inc to cast my spells and items and want to make use of the return values however i can't find the syntax for it. Someon told me:
Code: Select all
/call Cast "Ultor's Greaves of Faith" item
/if (${Macro.Return.Equal["CAST_RESISTED"]}){
/if (${announce}==1) {
/g %T RESISTED ${morspell}
} else {
/chat #${mychannel} %T RESISTED ${morspell}
}
}
but this does not work. Any help would be appreciated.
Posted: Thu Sep 02, 2004 7:27 pm
by Night Hawk
Well I use spellcast.inc but Rusty~ said it was the same in spell_routines.inc:
Code: Select all
/if (${String[${Macro.Return}].Equal[CAST_RESISTED]}) /varset NeedSlow 1
That's what I use and it works.
Posted: Thu Sep 02, 2004 8:02 pm
by Nueder
Ok String[] was what i was missing...the only thing i needed to change from what you posted was
Code: Select all
/if (${String[${Macro.Return}].Equal["CAST_RESISTED"]}) /varset NeedSlow 1
Thx for the help.
Posted: Thu Sep 02, 2004 8:13 pm
by Rusty~
heh first few looks at your code i couldnt find anything wrong. so i tried it and yeah it doesnt work. the problem is this line:
Code: Select all
/if (${Macro.Return.Equal["CAST_RESISTED"]}){
you need a space before the open brace at the end.. like this:
Code: Select all
/if (${Macro.Return.Equal["CAST_RESISTED"]}) {
Posted: Thu Sep 02, 2004 8:18 pm
by wassup
Nueder wrote:Ok String[] was what i was missing...the only thing i needed to change from what you posted was
Code: Select all
/if (${String[${Macro.Return}].Equal["CAST_RESISTED"]}) /varset NeedSlow 1
Thx for the help.
Ummm... no.
macro string.Return
So this should be
Code: Select all
/if (${Macro.Return.Equal[CAST_RESISTED]}) /varset NeedSlow 1