06.06.2014, 11:02
I got it, but I have one question regarding global variables. Let's say that I have something like this in the "variables" file:
This is the reason that my variables are in another file. If they would have been in the "accountsystem" file, for example, my other files would not recognize the sintax "pInfo[playerid][Username]" or variable "mysql" that holds the connection handle to my SQL server. That's why I have another file: I include it before the others, so that I won't have any problems.
I want a clean layout, and my current setup is not like that at all. What alternatives do I have? How should I integrate this piece of code into the others?
pawn Код:
enum pData
{
ID,
Username[MAX_PLAYER_NAME+1],
Password[129],
Salt[129],
Logged,
LoginAttempts,
Admin,
SkinID,
Spawned
}
new mysql,
pInfo[MAX_PLAYERS][pData];
I want a clean layout, and my current setup is not like that at all. What alternatives do I have? How should I integrate this piece of code into the others?