new registro 0
new logueo 1
new fallopass 2
new gPlayerLogged[MAX_PLAYER_NAME];
if(RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1);
{
ClearChatbox(playerid, 10);
{
if (gPlayerAccount[playerid] != 0)
{
new jugador[64];
GetPlayerName(playerid,jugador,sizeof(jugador));
ShowPlayerDialog(playerid,logueo,DIALOG_STYLE_INPUT,"Loguear",Hola, tu usuario ya existe\n Introduze tu contraseсa para entrar,"Loguear","Salir");
}
else
{
new jugador[64];
GetPlayerName(playerid,jugador,sizeof(jugador));
ShowPlayerDialog(playerid,registro,DIALOG_STYLE_INPUT,"Registro",Hola, no tienes cuenta en el servidor\n Por favor introduze una contraseсa para registrarte,"Registro","Salir");
}
if(SafeTime[i] == 1)
{
if(gPlayerAccount[i] == 1 && gPlayerLogged[i] == 0)
{
new jugadorlogin[64];
new jugador[128];
GetPlayerName(playerid,jugadorlogin,64);
format(jugador,sizeof(jugador),"Bienvenido, %s\nAhora puede iniciar sesiуn:",jugadorlogin);
ShowPlayerDialog(i,logueo,DIALOG_STYLE_INPUT,"Loguear",loginstring,"Loguear","Salir");
}
}
new loginstring[128];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"Bienvenido, %s\nAhora puede iniciar sesiуn:",loginname);
ShowPlayerDialog(playerid,logueo,DIALOG_STYLE_INPUT,"Loguear",loginstring,"Loguear","Salir");
}
else
{
new loginstring[128];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"WRONG PASSWORD \nPor favor introduzca la contraseсa correcta:",loginname);
ShowPlayerDialog(playerid,fallopass,DIALOG_STYLE_INPUT,"Loguear",loginstring,"Loguear","Salir");
fclose(UserFile);
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new sendername[MAX_PLAYER_NAME];
new string[128];
if(response)
{
if(dialogid == logueo || dialogid == fallopass)
{
if(strlen(inputtext))
{
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
Encrypt(tmppass);
OnPlayerLogin(playerid,tmppass);
}
else
{
new loginstring[128];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"WRONG PASSWORD \n Por favor introduzca la contraseсa correcta:",loginname);
ShowPlayerDialog(playerid,fallopass,DIALOG_STYLE_INPUT,"Loguear",loginstring,"Loguear","Salir");
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
}
}
if(dialogid == registro)
{
if(strlen(inputtext))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "users/%s.ini", sendername);
new File: hFile = fopen(string, io_read);
if (hFile)
{
SendClientMessage(playerid, COLOR_YELLOW, "Nombre de usuario que ya estб ocupado, por favor, elija uno diferente.");
fclose(hFile);
return 1;
}
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
Encrypt(tmppass);
OnPlayerRegister(playerid,tmppass);
}
else
{
new regstring[128];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"Bienvenido, %s\nNo tienes una cuenta.\nPor favor regнstrese:",regname);
ShowPlayerDialog(playerid,registro,DIALOG_STYLE_INPUT,"Registrar",regstring,"Registrar","Salir");
}
}
}
else
{
Kick(playerid);
}
return 1;
}
#pragma tabsize 0
(259) : error 001: expected token: ";", but found "-integer value-" (260) : error 001: expected token: ";", but found "-integer value-" (261) : error 001: expected token: ";", but found "-integer value-" (409) : error 021: symbol already defined: "gPlayerLogged" (4443) : error 010: invalid function or declaration (4446) : error 055: start of function body without function header (4447) : error 010: invalid function or declaration (4450) : error 021: symbol already defined: "GetPlayerName" (4453) : error 010: invalid function or declaration (4455) : error 021: symbol already defined: "jugador" (4672) : error 017: undefined symbol "i" (4675) : warning 219: local variable "jugador" shadows a variable at a preceding level (4676) : error 017: undefined symbol "playerid" (4678) : error 017: undefined symbol "i" (8636) : warning 219: local variable "loginstring" shadows a variable at a preceding level (8637) : warning 219: local variable "loginname" shadows a variable at a preceding level (9093) : error 054: unmatched closing brace ("}") (9094) : error 010: invalid function or declaration (9098) : error 021: symbol already defined: "GetPlayerName" (9103) : error 010: invalid function or declaration (9104) : error 010: invalid function or declaration (9142) : warning 219: local variable "loginstring" shadows a variable at a preceding level (9143) : warning 219: local variable "loginname" shadows a variable at a preceding level (27696) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg") (27744) : warning 203: symbol is never used: "jugador" (27744) : warning 203: symbol is never used: "loginname" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 18 Errors.
Originally Posted by Extremaydura
Nada mбs y nada menos que 18 Errores + 8 Warnings...! Un record! Jajaja.
Te paso los fallos a ver si me puedes ayudar. Ok? Код:
(259) : error 001: expected token: ";", but found "-integer value-" (260) : error 001: expected token: ";", but found "-integer value-" (261) : error 001: expected token: ";", but found "-integer value-" (409) : error 021: symbol already defined: "gPlayerLogged" (4443) : error 010: invalid function or declaration (4446) : error 055: start of function body without function header (4447) : error 010: invalid function or declaration (4450) : error 021: symbol already defined: "GetPlayerName" (4453) : error 010: invalid function or declaration (4455) : error 021: symbol already defined: "jugador" (4672) : error 017: undefined symbol "i" (4675) : warning 219: local variable "jugador" shadows a variable at a preceding level (4676) : error 017: undefined symbol "playerid" (4678) : error 017: undefined symbol "i" (8636) : warning 219: local variable "loginstring" shadows a variable at a preceding level (8637) : warning 219: local variable "loginname" shadows a variable at a preceding level (9093) : error 054: unmatched closing brace ("}") (9094) : error 010: invalid function or declaration (9098) : error 021: symbol already defined: "GetPlayerName" (9103) : error 010: invalid function or declaration (9104) : error 010: invalid function or declaration (9142) : warning 219: local variable "loginstring" shadows a variable at a preceding level (9143) : warning 219: local variable "loginname" shadows a variable at a preceding level (27696) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg") (27744) : warning 203: symbol is never used: "jugador" (27744) : warning 203: symbol is never used: "loginname" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 18 Errors. |
No es ningun record una vez tube 164 errores y 1240 warnings en un gm todo hecho mal xD
Con respecto a esto borra el callback onplaterprivmsg tenes que definir "i" |