where to save player infos

Post Reply
eraldo
Posts: 43
Joined: Sun Jul 12, 2009 1:25 am

where to save player infos

Post by eraldo »

I save my data in normal single variables:
e.g.
hp = matches[2]
etc

But I have seen that some people do it like this:
player.stats.tp = matches[2]

I am not quite sure of the pros and cons of those 2 methods but I like the idea alot!

Plus I was wondering if I could make the player part variable:
<player>.stats.tp

it should be possible with [format.string ...
but I am not sure how...
and it seems a little too long/complex keeping in mind that it will have to be used alot.

Any ideas/comments/suggestions?

Eraldo

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: where to save player infos

Post by Vadi »

I'd recommend mypackage.stats.tp = matches[2] so you wouldn't clash with other scripts accidentally.

Post Reply