Problem
#1

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 =)
Reply
#2

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;
}
Reply
#3

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;
}
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)