warning 202 - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (
https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: warning 202 (
/showthread.php?tid=517433)
warning 202 -
Jejox - 04.06.2014
Hola,
Porque son estos warning? por culpa de ellos cuando logeo se me cierra el server...
Quote:
(14589) : warning 202: number of arguments does not match definition
(20210) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
|
pawn Код:
function OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(password));
INI_Close(File);
TotalRegister++;
OnPlayerLogin(playerid); //Linea 14589
}
return 1;
}
pawn Код:
case DLOGIN:
{
if(response == 1)
{
if(udb_hash(inputtext) == Info[playerid][pKey])
{
InsideMainMenu[playerid] = false;
INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
KillTimer(LoginTimer[playerid]);
OnPlayerLogin(playerid); //Linea 20210
}
else
{
new ip[32];
new titlestring[64];
GetPlayerIp(playerid, ip, 32);
format(titlestring, sizeof(titlestring), "{C0C0C0}Cuenta Registrada");
format(string, sizeof(string), "{8080FF}Contraseсa:");
SafeDialogEx(playerid,DLOGIN,DIALOG_STYLE_PASSWORD ,titlestring,string,"Entrar","Salir");
SetPlayerVirtualWorld(playerid, 20);
return 1;
}
}
else
{
SendClientMessageEx(playerid, COLOR_BLANCO, "Fuiste expulsado del servidor automбticamente.");
Kick(playerid);
}
return 1;
}
La verdad no veo donde este el error, porque esos warning? xqxq
Respuesta: warning 202 -
Enriquedk - 04.06.2014
Cambia El onplayerlogin Por playerlogin Los 2
Respuesta: warning 202 -
juandiegox - 04.06.2014
Quote:
Originally Posted by Jejox
Hola,
Porque son estos warning? por culpa de ellos cuando logeo se me cierra el server...
pawn Код:
function OnPlayerRegister(playerid, password[]) { if(IsPlayerConnected(playerid)) { new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Password",udb_hash(password)); INI_Close(File); TotalRegister++;
OnPlayerLogin(playerid); //Linea 14589 } return 1; }
pawn Код:
case DLOGIN: { if(response == 1) { if(udb_hash(inputtext) == Info[playerid][pKey]) { InsideMainMenu[playerid] = false; INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid); KillTimer(LoginTimer[playerid]); OnPlayerLogin(playerid); //Linea 20210 } else { new ip[32]; new titlestring[64]; GetPlayerIp(playerid, ip, 32); format(titlestring, sizeof(titlestring), "{C0C0C0}Cuenta Registrada"); format(string, sizeof(string), "{8080FF}Contraseсa:"); SafeDialogEx(playerid,DLOGIN,DIALOG_STYLE_PASSWORD ,titlestring,string,"Entrar","Salir"); SetPlayerVirtualWorld(playerid, 20); return 1; } } else { SendClientMessageEx(playerid, COLOR_BLANCO, "Fuiste expulsado del servidor automбticamente."); Kick(playerid); } return 1; }
La verdad no veo donde este el error, porque esos warning? xqxq
|
Revisa como esta el Stock/public/loquesea, puede que sea algo como
pawn Код:
OnPlayerLogin(playerid, otrafuncion){
o algo parecido
y tu estas haciendo OnPlayerLogin(parametro); , puede que tenga mas parбmetros, o algo parecido, revisa que el stock lo uses bien, o el public lo quee sea.
Respuesta: warning 202 -
Enriquedk - 04.06.2014
Quote:
Originally Posted by juandiegox
Revisa como esta el Stock/public/loquesea, puede que sea algo como
pawn Код:
OnPlayerLogin(playerid, otrafuncion){
o algo parecido
y tu estas haciendo OnPlayerLogin(parametro); , puede que tenga mas parбmetros, o algo parecido, revisa que el stock lo uses bien, o el public lo quee sea.
|
Como Dije amigo
el
Код:
OnPlayerLogin(playerid); //Linea 14589
hay que cambiarlo a
Код:
PlayerLogin(playerid); //Linea 14589
igual con el otro onplayer
Prueba para que vea que si le va a funcionar
Respuesta: warning 202 -
Jejox - 04.06.2014
Quote:
Originally Posted by Enriquedk
Como Dije amigo
el
Код:
OnPlayerLogin(playerid); //Linea 14589
hay que cambiarlo a
Код:
PlayerLogin(playerid); //Linea 14589
igual con el otro onplayer
Prueba para que vea que si le va a funcionar
|
Funciono :O que raro antes si me andaba bien pero de repente me aparecieron esos warning, funciono con sacarle los "On" xd
gracias. +REP
Respuesta: warning 202 -
Enriquedk - 04.06.2014
Quote:
Originally Posted by Jejox
Funciono :O que raro antes si me andaba bien pero de repente me aparecieron esos warning, funciono con sacarle los "On" xd
gracias. +REP
|
De nada amigo estoy para ayudar