SA-MP Forums Archive
Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem (/showthread.php?tid=279666)



Problem - antonio600x - 28.08.2011

Quote:

C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(96) : warning 217: loose indentation
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(96) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(96) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(96) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(96) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Quote:

** *GetPlayerName(playerid, name, sizeof(name));

Quote:

92-107
public OnPlayerConnect(playerid)
{
gPlayerLogged[playerid] = 0;
new name[MAX_PLAYER_NAME], file[256];
** *GetPlayerName(playerid, name, sizeof(name));
** *format(file, sizeof(file), SERVER_USER_FILE, name);
** *if (!dini_Exists(file))
** *{
** *ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "REGISTER", "Unesite zeljenu sifru da se registrirate.", "Register", "Izlaz");
** *}
** *if(fexist(file))
** *{
** *ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "LOGIN", "Unesite vasu sifru da se logirate.", "Login", "Izlaz");
}
return 1;
}

please help my =)


Re: Problem - PhoenixB - 28.08.2011

Use this code:

pawn Code:
public OnPlayerConnect(playerid)
{
    gPlayerLogged[playerid] = 0;
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), SERVER_USER_FILE, name);
    if (!dini_Exists(file))
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "REGISTER", "Unesite zeljenu sifru da se registrirate.", "Register", "Izlaz");
    }
    if(fexist(file))
    {
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "LOGIN", "Unesite vasu sifru da se logirate.", "Login", "Izlaz");
    }
    return 1;
}



Re: Problem - antonio600x - 28.08.2011

Code:
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(110) : warning 217: loose indentation
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(110) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(110) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(110) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(110) : fatal error 107: too many error messages on one line
public OnPlayerDisconnect(playerid, reason)
{
new name[MAX_PLAYER_NAME], file[256];
** *GetPlayerName(playerid, name, sizeof(name));
** *format(file, sizeof(file), SERVER_USER_FILE, name);
** *if(gPlayerLogged[playerid] == 1)
** *{
** * * *dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]);
** * * *dini_IntSet(file, "Cash", PlayerInfo[playerid][pCash]);
** * * *dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]);
** *}
** *gPlayerLogged[playerid] = 0;
return 1;
}


Re: Problem - PhoenixB - 28.08.2011

pawn Code:
public OnPlayerDisconnect(playerid, reason)
{
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), SERVER_USER_FILE, name);
    if(gPlayerLogged[playerid] == 1)
    {
        dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]);
        dini_IntSet(file, "Cash", PlayerInfo[playerid][pCash]);
        dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]);
    }
    gPlayerLogged[playerid] = 0;
}
return 1;

There, try it.