Nooby Question
#1

I know this is a nooby question,but please help me out

C:\Users\Raul\Downloads\My PROJECT\samp03csvr_RC2_win32\gamemodes\SAPL.pwn(71 ) : error 017: undefined symbol "gPlayerLogged"
C:\Users\Raul\Downloads\My PROJECT\samp03csvr_RC2_win32\gamemodes\SAPL.pwn(71 ) : warning 215: expression has no effect
C:\Users\Raul\Downloads\My PROJECT\samp03csvr_RC2_win32\gamemodes\SAPL.pwn(71 ) : error 001: expected token: ";", but found "]"
C:\Users\Raul\Downloads\My PROJECT\samp03csvr_RC2_win32\gamemodes\SAPL.pwn(71 ) : error 029: invalid expression, assumed zero
C:\Users\Raul\Downloads\My PROJECT\samp03csvr_RC2_win32\gamemodes\SAPL.pwn(71 ) : fatal error 107: too many error messages on one line

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


4 Errors.


i did:
pawn Код:
new gPlayerLogged[MAX_PLAYERS];




public OnPlayerConnect(playerid)
{
    gPlayerLogged[playerid] = 0;// This is the 71 line

public OnPlayerDisconnect(playerid, reason)
{
gPlayerLogged[playerid] = 0;
Reply
#2

you must add two braces

new gPlayerLogged[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
gPlayerLogged[playerid] = 0;// This is the 71 line
}
public OnPlayerDisconnect(playerid, reason)
{
gPlayerLogged[playerid] = 0;
}
Reply
#3

Noo,not that,i just posted the begin of the script

pawn Код:
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, "Hello There! You are not registered.", "Please input a password below to create an account...", "Register", "Leave");
    }
    if(fexist(file))
    {
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Hello There! You are registered.", "Please input your password below to login to your account...", "Login", "Leave");
    }
    return 1;
}


    return 1;
}



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, "Money", PlayerInfo[playerid][pCash]);
        dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]);
    }
    gPlayerLogged[playerid] = 0;
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)