PDA

View Full Version : [AJUDA] ERRINHO


goku114
30/05/2012, 02:37 PM
public OnPlayerDisconnect(playerid, reason)
//registro
if(INI_Open(ObterINI(playerid))) {

INI_WriteInt("Score",PlayerInfo[playerid][pScore]);
INI_WriteInt("Dinheiro",GetPlayerMoney(playerid));
INI_WriteInt("Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt("Skin",GetPlayerSkin(playerid));
INI_WriteInt("Procura",PlayerInfo[playerid][pWanted]);
INI_Save();
INI_Close();
}
return 1; AQUI TA DANDO O PROBLEM '-'
}


ESSE E O ERRO


I:\Documents and Settings\Administrador\Desktop\GM\gamemodes\GM.pwn (124) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Delete_
30/05/2012, 02:39 PM
public OnPlayerDisconnect(playerid, reason)
//registro
if(INI_Open(ObterINI(playerid))) {

INI_WriteInt("Score",PlayerInfo[playerid][pScore]);
INI_WriteInt("Dinheiro",GetPlayerMoney(playerid));
INI_WriteInt("Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt("Skin",GetPlayerSkin(playerid));
INI_WriteInt("Procura",PlayerInfo[playerid][pWanted]);
INI_Save();
INI_Close();
}
return 0;
}

'Duallity
30/05/2012, 02:40 PM
return 1;

para
return 0;

rjjj
30/05/2012, 02:42 PM
Faltou uma chave aqui :mrgreen::



public OnPlayerDisconnect(playerid, reason)
{//registro
if(INI_Open(ObterINI(playerid))) {

INI_WriteInt("Score",PlayerInfo[playerid][pScore]);
INI_WriteInt("Dinheiro",GetPlayerMoney(playerid));
INI_WriteInt("Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt("Skin",GetPlayerSkin(playerid));
INI_WriteInt("Procura",PlayerInfo[playerid][pWanted]);
INI_Save();
INI_Close();
}
return 1;
}





Espero ter ajudado :p.

goku114
30/05/2012, 02:49 PM
agora deu um warning lose identification no return 1

rjjj
30/05/2012, 02:51 PM
agora deu um warning lose identification no return 1


Basta organizar seu código :mrgreen::



public OnPlayerDisconnect(playerid, reason)
{
if(INI_Open(ObterINI(playerid)))
{
INI_WriteInt("Score",PlayerInfo[playerid][pScore]);
INI_WriteInt("Dinheiro",GetPlayerMoney(playerid));
INI_WriteInt("Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt("Skin",GetPlayerSkin(playerid));
INI_WriteInt("Procura",PlayerInfo[playerid][pWanted]);
INI_Save();
INI_Close();
}
return 1;
}




Espero ter ajudado :p.