Jump to content
  • 0

Problema define ...


Bogdan1

Question

Salut , am si eu niste probleme cand vreau sa creez un sistem Register....

C:\Users\BogdanJrr\Desktop\X-Zone\pawno\include\YSI/y_ini.inc(1050) : warning 202: number of arguments does not match definition
C:\Users\BogdanJrr\Desktop\samp037_svr R2-1-1_win32.zip\gamemodes\Comenzi.pwn(113) : error 017: undefined symbol "UserPath"
C:\Users\BogdanJrr\Desktop\samp037_svr R2-1-1_win32.zip\gamemodes\Comenzi.pwn(115) : error 017: undefined symbol "UserPath"
C:\Users\BogdanJrr\Desktop\samp037_svr R2-1-1_win32.zip\gamemodes\Comenzi.pwn(116) : error 017: undefined symbol "DIALOG_LOGIN"
C:\Users\BogdanJrr\Desktop\samp037_svr R2-1-1_win32.zip\gamemodes\Comenzi.pwn(116) : error 017: undefined symbol "COL_WHITE"
C:\Users\BogdanJrr\Desktop\samp037_svr R2-1-1_win32.zip\gamemodes\Comenzi.pwn(116) : warning 215: expression has no effect
C:\Users\BogdanJrr\Desktop\samp037_svr R2-1-1_win32.zip\gamemodes\Comenzi.pwn(116) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\BogdanJrr\Desktop\samp037_svr R2-1-1_win32.zip\gamemodes\Comenzi.pwn(116) : fatal error 107: too many error messages on one line

 

 

Liniile care le am introduse-

 

#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4

//colors define
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"

enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pKills,
    pDeaths
}
new PlayerInfo[MAX_PLAYERS][pInfo];

forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    return 1;
}
stock UserPath(playerid)
{
    new string[128],playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(string),PATH,playername);
    return string;
}
stock udb_hash(buf[]) {
    new length=strlen(buf);
    new s1 = 1;
    new s2 = 0;
    new n;
    for (n=0; n<length; n++)
    {
       s1 = (s1 + buf[n]) % 65521;
       s2 = (s2 + s1)     % 65521;
    }
    return (s2 << 16) + s1;
}

 

public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
    }
    return 1;
}

 

 

public OnPlayerDisconnect(playerid, reason)
{
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
    INI_Close(File);
    return 1;
}

 

 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.