15.07.2015, 12:28
enum PlayerInfo
{
ConnectedTime,
AnotherVariable
};
new pInfo[MAX_PLAYERS][PlayerInfo];
OR
new ConnectedTime[MAX_PLAYERS],AnotherVariable[MAX_PLAYERS];
Which variable definition is better?
I ask this because currently i use first method (enum) and i have a variable named "ConnectedTime" like this
pInfo[playerid][ConnectedTime] = gettime(); // This is at login dialog.
I use some math like this:
new anothervar=gettime()-pInfo[playerid][ConnectedTime]
sometimes, anothervar is 0, but this is not the true...
The enums variables are the reason? They can't store big numbers like timestamps?
{
ConnectedTime,
AnotherVariable
};
new pInfo[MAX_PLAYERS][PlayerInfo];
OR
new ConnectedTime[MAX_PLAYERS],AnotherVariable[MAX_PLAYERS];
Which variable definition is better?
I ask this because currently i use first method (enum) and i have a variable named "ConnectedTime" like this
pInfo[playerid][ConnectedTime] = gettime(); // This is at login dialog.
I use some math like this:
new anothervar=gettime()-pInfo[playerid][ConnectedTime]
sometimes, anothervar is 0, but this is not the true...
The enums variables are the reason? They can't store big numbers like timestamps?
Sorry for bad english.