Arrays
#6

Quote:
Originally Posted by [Diablo]
View Post
i use enum for my rank system.

pawn Code:
enum E_RANK
{
    E_RANK_NAME[30],
    Float:E_RANK_POS[3],
    E_RANK_INTEGER
}
new RankArray[][R_RANK] =
{
    { "rank1", x, y, z, i },
    { "rank2", x, y, z, i }
    // more here
}

for(new x; x < sizeof(RankArray); x++)
{
    printf("Rank name: %s", RankArray[x][E_RANK_NAME]); // should print "rank1", "rank2" ..
}
this is not tested.
Ah, that was the thing i was missing, thanks!
I used this before, but couldnt find out how i did it
Reply


Messages In This Thread
Arrays - by Wesley221 - 01.02.2012, 08:30
Re: Arrays - by T0pAz - 01.02.2012, 08:32
Re: Arrays - by Wesley221 - 01.02.2012, 08:36
Re: Arrays - by T0pAz - 01.02.2012, 08:49
Re: Arrays - by [Diablo] - 01.02.2012, 08:50
Re: Arrays - by Wesley221 - 01.02.2012, 08:53

Forum Jump:


Users browsing this thread: 2 Guest(s)