Enums or not?
#1

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?

Sorry for bad english.
Reply


Messages In This Thread
Enums or not? - by Adi007 - 15.07.2015, 12:28
AW: Enums or not? - by Kaliber - 15.07.2015, 12:47
Re: Enums or not? - by Adi007 - 15.07.2015, 13:01
Re: Enums or not? - by Sithis - 15.07.2015, 13:08
Re: Enums or not? - by Stanford - 15.07.2015, 13:31
AW: Enums or not? - by Kaliber - 15.07.2015, 13:40
Re: Enums or not? - by Adi007 - 15.07.2015, 13:50
Re: Enums or not? - by Stanford - 15.07.2015, 21:47
Re: Enums or not? - by Adi007 - 16.07.2015, 10:12

Forum Jump:


Users browsing this thread: 1 Guest(s)