sizeof through an array
#1

I have this enum;

pawn Код:
enum pVars
{
    Password[129],
    Admin,
   
    WeaponKills[46]
}
new
    PlayerInfo[MAX_PLAYERS][pVars],
    bool: is_logged[MAX_PLAYERS];
Pretty standard, but I'm trying to access the amount of cells in "WeaponKills" which is currently 46.

I was going to do it like this;

pawn Код:
for(new i; i < sizeof(PlayerInfo[playerid][WeaponKills]); i++)
{
}
But obviously since I'm here, it doesn't work. How would I go about doing that?
Reply


Messages In This Thread
sizeof through an array - by 2KY - 21.12.2013, 20:58
Re: sizeof through an array - by Konstantinos - 21.12.2013, 21:03
Re: sizeof through an array - by Pottus - 21.12.2013, 21:06
Re: sizeof through an array - by Patrick - 21.12.2013, 21:17
Re: sizeof through an array - by 2KY - 21.12.2013, 21:35

Forum Jump:


Users browsing this thread: 2 Guest(s)