Nooby Question - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Nooby Question (
/showthread.php?tid=195448)
Nooby Question -
SkizzoTrick - 02.12.2010
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;
Re: Nooby Question -
psoftware - 02.12.2010
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;
}
Re: Nooby Question -
SkizzoTrick - 02.12.2010
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;
}