Simple enum question.
#1

Im just now returning to sa:mp, and i noticed that... i completely forgot how to make enums.

Im trying to make an enum that will make variables possible like playerdata[playerid][money]

I know its something like this, but can someone make sure i got it right plz and ty

pawn Код:
enum playerinfo
{
    money,
    score;
}
new playerdata[MAX_PLAYERS][playerinfo];
Reply
#2

Remove the semi-colon from the enumerator and you're sorted!

Welcome back, by the way.
Reply
#3

pawn Код:
enum playerinfo
{
    money,
    score
};
new playerdata[MAX_PLAYERS][playerinfo];
this should do it
Reply
#4

Ahh ok thankyou, i was close And its good to be back!
Reply
#5

The money and score variables were just an example.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)