Server structure help
#2

I got it, but I have one question regarding global variables. Let's say that I have something like this in the "variables" file:
pawn Код:
enum pData
{
    ID,
    Username[MAX_PLAYER_NAME+1],
    Password[129],
    Salt[129],
    Logged,
    LoginAttempts,
    Admin,
    SkinID,
    Spawned
}

new mysql,
    pInfo[MAX_PLAYERS][pData];
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?
Reply


Messages In This Thread
Server structure help - by Opptur - 05.06.2014, 19:53
Re: Server structure help - by Opptur - 06.06.2014, 11:02
Re: Server structure help - by RajatPawar - 06.06.2014, 11:22
Re: Server structure help - by CaveDweller - 07.06.2014, 17:04
Re: Server structure help - by Opptur - 08.06.2014, 13:10

Forum Jump:


Users browsing this thread: 1 Guest(s)