non-numeric error?

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

grayfox107
decaying skeleton
decaying skeleton
Posts: 5
Joined: Thu May 13, 2004 12:23 am

non-numeric error?

Post by grayfox107 » Wed Aug 18, 2004 12:12 am

basically i want to detect if there is any pc in the zone but i keep comming up with an error with this. any help would be great

Code: Select all

   /if (${Spawn[pc].ID}=${Me.ID}) 

Sparr
a hill giant
a hill giant
Posts: 159
Joined: Mon Jun 24, 2002 5:41 am

Post by Sparr » Wed Aug 18, 2004 12:14 am

==
[img]http://www.trifocus.net/~sparr/sparr_rotate_sig_16.gif[/img]

Mimatas
a hill giant
a hill giant
Posts: 262
Joined: Wed Mar 10, 2004 4:22 pm

Post by Mimatas » Wed Aug 18, 2004 11:33 am

rofl. I love boolean =.

To take what sparr has so clearly stated, and make it painfully clear:

Code: Select all

 /if (${Spawn[pc].ID}=${Me.ID}) 
should be

Code: Select all

 /if (${Spawn[pc].ID}==${Me.ID}) 
good luck

Insipid
decaying skeleton
decaying skeleton
Posts: 9
Joined: Sun Aug 08, 2004 12:15 pm

PCs in Zone

Post by Insipid » Wed Aug 18, 2004 6:51 pm

Now that == is cleared up, I'm wondering if you're going to get what you're after. If you want to know if any PCs are in the zone (besides you), I think you need something like:

Code: Select all

/if ( ${SpawnCount[pc]} > 1 ) {
    [ Code to run if there is someone besides you in zone ]
} else {
    [ Code to run if it is only you ]
}
Pretty new myself but something I thought of. :D
- Insipid