Page 1 of 1
Help with GM code
Posted: Wed Apr 21, 2004 1:53 pm
by Macronewbie
Need to find out how to correct this.
${Zone.Spawn.GM}
${Zone.GM}
neither work. plz help.
Posted: Wed Apr 21, 2004 2:05 pm
by s16z
have you tried ${Spawn[gm]}?
Posted: Wed Apr 21, 2004 2:22 pm
by magictiger
If you're trying to display a GM indicator...
${If[!${Spawn[gm]},FALSE,TRUE]} seems to be working for me.
${Spawn[gm]} checks the spawn list for a gm. If there's not one, it returns NULL
${Spawn[id].GM} is GM status as a boolean (TRUE,FALSE)
Posted: Wed Apr 21, 2004 2:55 pm
by s16z
OMG, you will drive people insane with that logic
Why negate it then reverse the resullts? Try:
Edit: Corrected spelling error, because I was driven INSANE!
Posted: Wed Apr 21, 2004 3:01 pm
by magictiger
Because I like exclamation points and driving people crazy :)
and because of a logic error, I kept getting NULL when I tried to do it the other way, but this way worked for me. :)
Posted: Wed Apr 21, 2004 3:02 pm
by Lax
... because one way you will get this:
${If[Brenlo,TRUE,FALSE]} and the parser will be like .. what the FUCK do i do with "Brenlo" ..
here is the correct way to do this
{3011, "${If[${Spawn[gm].ID},TRUE,FALSE]}"},
please just wait for the damn zip and stop using the posted offsets when we have updates coming
Edit: fixed typo
Posted: Wed Apr 21, 2004 3:07 pm
by magictiger
Ok, what's the {3011 for? I haven't seen that used in other places yet.
Posted: Thu Apr 22, 2004 6:02 pm
by OldNecro
${If[Spawn[gm].ID,TRUE,FALSE]}
...returns NULL every time. Exact cut and paste from Lax's post went into the UI file using 9999...
Posted: Thu Apr 22, 2004 6:05 pm
by Lax
hah oops typo
${If[${Spawn[gm].ID},TRUE,FALSE]}
My bad
Posted: Fri Apr 23, 2004 8:13 am
by OldNecro
I can't believe I didn't notice that myself... *sigh*