Local vs Global variables

Gary Brown
Okay, silly question here. How does one assign a variable so that's it's specificly for the player object. I've set up a procedure to set player stats, (strength, dex, iq, health) but if I change them on one player they get changed on any other players. Obviously I've screwed up and set them as global variables. I've missed something obvious. Any help would be appreciated. : )

Alex
You use arrays with the index being the userid. So instead of using a "health" variable, you use "health[userid]".

Gary Brown
Ah. Okay, thanks. :)

METALGod32
Cool, Thanks to this thread this solved my prob to, Thanks :)

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums