16.09.2015, 20:21
Pessoal, eu to fazendo minha gamemode em dof2, na public OnPlayerSave passei para dof2 e compilou sem nenhum erro. Na Public OnPlayerLogin deu os seguintes erros, e eu nгo entendi muito bem, alguйm poderia me ajudar?
Код:
C:\Users\Jeferson\Desktop\BGT - zcmd e dof2.pwn(16337) : warning 209: function "OnPlayerLogin" should return a value C:\Users\Jeferson\Desktop\BGT - zcmd e dof2.pwn(16118) : warning 204: symbol is assigned a value that is never used: "tmp2" C:\Users\Jeferson\Desktop\BGT - zcmd e dof2.pwn(16118 -- 16338) : error 010: invalid function or declaration C:\Users\Jeferson\Desktop\BGT - zcmd e dof2.pwn(16118 -- 16343) : error 010: invalid function or declaration C:\Users\Jeferson\Desktop\BGT - zcmd e dof2.pwn(16118 -- 16348) : error 010: invalid function or declaration C:\Users\Jeferson\Desktop\BGT - zcmd e dof2.pwn(16118 -- 16348) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
PHP код:
public OnPlayerLogin(playerid,password[])
{
new tmp2[256]; // LINHA 16118
new string2[64];
format(string2, sizeof(string2), "Contas/%s.ini", PlayerName(playerid));
strmid(PlayerInfo[playerid][pKey], DOF2_GetString(string2, "Key"), 0, strlen(DOF2_GetString(string2, "Key")), 255);
if(strcmp(PlayerInfo[playerid][pKey],password, true) == 0)
{
PlayerInfo[playerid][pLevel] = DOF2_GetInt(string2, "Level");
PlayerInfo[playerid][pAdmin] = DOF2_GetInt(string2, "AdminLevel");
PlayerInfo[playerid][pHelper] = DOF2_GetInt(string2, "HelperLevel");
PlayerInfo[playerid][pVIP] = DOF2_GetInt(string2, "DonateRank");
PlayerInfo[playerid][pDiaVIP] = DOF2_GetInt(string2, "DiasVIP");
PlayerInfo[playerid][pMesVIP] = DOF2_GetInt(string2, "MesVIP");
PlayerInfo[playerid][pAnoVIP] = DOF2_GetInt(string2, "AnoVIP");
PlayerInfo[playerid][gPupgrade] = DOF2_GetInt(string2, "UpgradePoints");
PlayerInfo[playerid][pConnectTime] = DOF2_GetInt(string2, "ConnectedTime");
PlayerInfo[playerid][pReg] = DOF2_GetInt(string2, "Registered");
PlayerInfo[playerid][pSex] = DOF2_GetInt(string2, "Sex");
PlayerInfo[playerid][pMuted] = DOF2_GetInt(string2, "Muted");
PlayerInfo[playerid][pExp] = DOF2_GetInt(string2, "Respect");
PlayerInfo[playerid][pCash] = DOF2_GetInt(string2, "Money");
PlayerInfo[playerid][pConta] = DOF2_GetInt(string2, "Bank");
PlayerInfo[playerid][pCrimes] = DOF2_GetInt(string2, "Crimes");
PlayerInfo[playerid][pKills] = DOF2_GetInt(string2, "Kills");
PlayerInfo[playerid][pDeaths] = DOF2_GetInt(string2, "Deaths");
PlayerInfo[playerid][pPhoneBook] = DOF2_GetInt(string2, "Phonebook");
PlayerInfo[playerid][pLottoNr] = DOF2_GetInt(string2, "LottoNr");
PlayerInfo[playerid][pFishes] = DOF2_GetInt(string2, "Fishes");
PlayerInfo[playerid][pBiggestFish] = DOF2_GetInt(string2, "BiggestFish");
PlayerInfo[playerid][pEmprego] = DOF2_GetInt(string2, "Emprego");
PlayerInfo[playerid][pSalario] = DOF2_GetInt(string2, "Paycheck");
PlayerInfo[playerid][pHeadValue] = DOF2_GetInt(string2, "HeadValue");
PlayerInfo[playerid][pHeadValueT] = DOF2_GetInt(string2, "HeadValueT");
PlayerInfo[playerid][pJailed] = DOF2_GetInt(string2, "Jailed");
PlayerInfo[playerid][pJailTime] = DOF2_GetInt(string2, "JailTime");
PlayerInfo[playerid][pCapacete] = DOF2_GetInt(string2, "Capacete");
PlayerInfo[playerid][pMats] = DOF2_GetInt(string2, "Materiais");
PlayerInfo[playerid][pDrogas] = DOF2_GetInt(string2, "Maconha");
PlayerInfo[playerid][pDrogas2] = DOF2_GetInt(string2, "Cocaina");
PlayerInfo[playerid][pDrogas3] = DOF2_GetInt(string2, "Crack");
PlayerInfo[playerid][pLider] = DOF2_GetInt(string2, "Lider");
PlayerInfo[playerid][pMembro] = DOF2_GetInt(string2, "Member");
PlayerInfo[playerid][pCargo] = DOF2_GetInt(string2, "Rank");
PlayerInfo[playerid][pSkin] = DOF2_GetInt(string2, "Char");
PlayerInfo[playerid][pContractTime] = DOF2_GetInt(string2, "ContractTime");
PlayerInfo[playerid][pDetSkill] = DOF2_GetInt(string2, "DetSkill");
PlayerInfo[playerid][pSexSkill] = DOF2_GetInt(string2, "SexSkill");
PlayerInfo[playerid][pBoxSkill] = DOF2_GetInt(string2, "BoxSkill");
PlayerInfo[playerid][pLawSkill] = DOF2_GetInt(string2, "LawSkill");
PlayerInfo[playerid][pMechSkill] = DOF2_GetInt(string2, "MechSkill");
PlayerInfo[playerid][pNewsSkill] = DOF2_GetInt(string2, "NewsSkill");
PlayerInfo[playerid][pDrogasSkill] = DOF2_GetInt(string2, "DrogasSkill");
PlayerInfo[playerid][pCookSkill] = DOF2_GetInt(string2, "CookSkill");
PlayerInfo[playerid][pFishSkill] = DOF2_GetInt(string2, "FishSkill");
PlayerInfo[playerid][pSHealth] = DOF2_GetFloat(string2, "pSHealth");
PlayerInfo[playerid][pTeam] = DOF2_GetInt(string2, "Team");
PlayerInfo[playerid][pPnumber] = DOF2_GetInt(string2, "PhoneNr");
PlayerInfo[playerid][pPHousekey] = DOF2_GetInt(string2, "House");
PlayerInfo[playerid][pPbiskey] = DOF2_GetInt(string2, "Bizz");
PlayerInfo[playerid][pPos_x] = DOF2_GetFloat(string2, "Pos_x");
PlayerInfo[playerid][pPos_y] = DOF2_GetFloat(string2, "Pos_y");
PlayerInfo[playerid][pPos_z] = DOF2_GetFloat(string2, "Pos_z");
PlayerInfo[playerid][pCarLic] = DOF2_GetInt(string2, "CarLic");
PlayerInfo[playerid][pFlyLic] = DOF2_GetInt(string2, "FlyLic");
PlayerInfo[playerid][pBoatLic] = DOF2_GetInt(string2, "BoatLic");
PlayerInfo[playerid][pGunLic] = DOF2_GetInt(string2, "GunLic");
PlayerInfo[playerid][pPayDay] = DOF2_GetInt(string2, "PayDay");
PlayerInfo[playerid][pCDPlayer] = DOF2_GetInt(string2, "CDPlayer");
PlayerInfo[playerid][pWins] = DOF2_GetInt(string2, "Wins");
PlayerInfo[playerid][pLoses] = DOF2_GetInt(string2, "Loses");
PlayerInfo[playerid][pAlcoholPerk] = DOF2_GetInt(string2, "AlcoholPerk");
PlayerInfo[playerid][pDrugPerk] = DOF2_GetInt(string2, "DrugPerk");
PlayerInfo[playerid][pMiserPerk] = DOF2_GetInt(string2, "MiserPerk");
PlayerInfo[playerid][pPainPerk] = DOF2_GetInt(string2, "PainPerk");
PlayerInfo[playerid][pTraderPerk] = DOF2_GetInt(string2, "TraderPerk");
PlayerInfo[playerid][pTut] = DOF2_GetInt(string2, "Tutorial");
PlayerInfo[playerid][pWarns] = DOF2_GetInt(string2, "Avisos");
PlayerInfo[playerid][pWarns] = DOF2_GetInt(string2, "Avisos");
PlayerInfo[playerid][pMarried] = DOF2_GetInt(string2, "Married");
strmid(PlayerInfo[playerid][pMarriedTo],DOF2_GetString(string2,"MarriedTo"),0,strlen(DOF2_GetString(string2,"MarriedTo")),255);
PlayerInfo[playerid][pSpawn] = DOF2_GetInt(string2, "Spawn");
PlayerInfo[playerid][pSafeDrogas] = DOF2_GetInt(string2, "SafeMaconha");
PlayerInfo[playerid][pSafeDrogas2] = DOF2_GetInt(string2, "SafeCocaina");
PlayerInfo[playerid][pSafeDrogas3] = DOF2_GetInt(string2, "SafeCrack");
WantedPoints[playerid] = DOF2_GetInt(string2, "NivelProcurado");
PlayerInfo[playerid][psMats] = DOF2_GetInt(string2, "SafeMateriais");
PlayerInfo[playerid][pLuta] = DOF2_GetInt(string2, "Luta");
PlayerInfo[playerid][pDorgado] = DOF2_GetInt(string2, "Dorgado");
PlayerInfo[playerid][pDorgado2] = DOF2_GetInt(string2, "Dorgado2");
PlayerInfo[playerid][pDoenca] = DOF2_GetInt(string2, "Doenca");
PlayerInfo[playerid][pCreditos] = DOF2_GetInt(string2, "Creditos");
strmid(PlayerInfo[playerid][pLastLogin],DOF2_GetString(string2,"LU"),0,strlen(DOF2_GetString(string2,"LU")),255);
strmid(PlayerInfo[playerid][pAdminAgendou],DOF2_GetString(string2,"AdminAgendou"),0,strlen(DOF2_GetString(string2,"AdminAgendou")),255);
strmid(PlayerInfo[playerid][pMotivoAgendou],DOF2_GetString(string2,"MotivoAgendou"),0,strlen(DOF2_GetString(string2,"MotivoAgendou")),255);
PlayerInfo[playerid][pAgendado] = DOF2_GetInt(string2, "Agendado");
PlayerInfo[playerid][pTempoAgendado] = DOF2_GetInt(string2, "TempoAgendado");
PlayerInfo[playerid][pTempoHospitalizado] = DOF2_GetInt(string2, "TempoHospital");
PlayerInfo[playerid][pHospitalID] = DOF2_GetInt(string2, "HospitalID");
PlayerInfo[playerid][pGun1] = DOF2_GetInt(string2, "Gun1");
PlayerInfo[playerid][pGun2] = DOF2_GetInt(string2, "Gun2");
PlayerInfo[playerid][pGun3] = DOF2_GetInt(string2, "Gun3");
PlayerInfo[playerid][pGun4] = DOF2_GetInt(string2, "Gun4");
PlayerInfo[playerid][pGun5] = DOF2_GetInt(string2, "Gun5");
PlayerInfo[playerid][pGun6] = DOF2_GetInt(string2, "Gun6");
PlayerInfo[playerid][pGun7] = DOF2_GetInt(string2, "Gun7");
PlayerInfo[playerid][pGun8] = DOF2_GetInt(string2, "Gun8");
PlayerInfo[playerid][pGun9] = DOF2_GetInt(string2, "Gun9");
PlayerInfo[playerid][pGun10] = DOF2_GetInt(string2, "Gun10");
PlayerInfo[playerid][pGun11] = DOF2_GetInt(string2, "Gun11");
PlayerInfo[playerid][pGun12] = DOF2_GetInt(string2, "Gun12");
PlayerInfo[playerid][pAmmo1] = DOF2_GetInt(string2, "Ammo1");
PlayerInfo[playerid][pAmmo2] = DOF2_GetInt(string2, "Ammo2");
PlayerInfo[playerid][pAmmo3] = DOF2_GetInt(string2, "Ammo3");
PlayerInfo[playerid][pAmmo4] = DOF2_GetInt(string2, "Ammo4");
PlayerInfo[playerid][pAmmo5] = DOF2_GetInt(string2, "Ammo5");
PlayerInfo[playerid][pAmmo6] = DOF2_GetInt(string2, "Ammo6");
PlayerInfo[playerid][pAmmo7] = DOF2_GetInt(string2, "Ammo7");
PlayerInfo[playerid][pAmmo8] = DOF2_GetInt(string2, "Ammo8");
PlayerInfo[playerid][pAmmo9] = DOF2_GetInt(string2, "Ammo9");
PlayerInfo[playerid][pAmmo10] = DOF2_GetInt(string2, "Ammo10");
PlayerInfo[playerid][pAmmo11] = DOF2_GetInt(string2, "Ammo11");
PlayerInfo[playerid][pAmmo12] = DOF2_GetInt(string2, "Ammo12");
PlayerInfo[playerid][pCaixinha] = DOF2_GetInt(string2, "Caixinha");
PlayerInfo[playerid][pBan] = DOF2_GetInt(string2, "Ban");
logouagora[playerid] = 1;
CheckOwner(playerid);
CheckOwnerb(playerid);
CheckOwnerh(playerid);
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "Sua senha estб errada! Se errar a senha 5 vezes, serб banido!");
SetPlayerCameraPos(playerid, 2172.2339,1081.8772,85.9312);
SetPlayerCameraLookAt(playerid, 2237.5205,1084.2983,51.6090);
SetPlayerPos(playerid, 2172.2339,1081.8772,85.9312);
SetPlayerInterior(playerid, 0);
TextDrawShowForPlayer(playerid,cima2);
TextDrawShowForPlayer(playerid,cima);
TextDrawShowForPlayer(playerid,baixo);
SendClientMessage(playerid, COLOR_AZULBB, "{00FBFB}_____________________________|Informaзхes Importantes|_____________________________");
SendClientMessage(playerid, COLOR_AZULBB, "{FFFFFF}[{CF055B}Bem Vindo{FFFFFF}]:Sua conta jб estб em nosso banco de dados.");
SendClientMessage(playerid, COLOR_AZULBB, "{FFFFFF}[{CF055B}Informaзгo{FFFFFF}]:Digite sua Senha para logar no servidor.");
SendClientMessage(playerid, COLOR_AZULBB, "{FFFFFF}[{CF055B}Forum{FFFFFF}]:www.brgamertroll.forumeiros.com");
SendClientMessage(playerid, COLOR_AZULBB, "{00FBFB}___________________________________________________________________________________________________");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "Fazendo Seu Login:", "{FFFFFF}Seja Bem Vindo(a)\n{FFFFFF}Conta: {FFFFAE}Registrada\n{BF0060}\nPor Favor Digite Sua Senha Para Logar !", "Logar", "Esperar");
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 5)
{
new stri[64], tmp[20], tmp3[20], ip[16];
GetPlayerIp(playerid, ip, sizeof ip);
format(stri, sizeof(stri), "IPsBanidos/%s.ini",ip);
getdate(Ano, Mes, Dia);
format(tmp, 20, "%d/%d/%d", Dia, Mes, Ano);
gettime(Hora, Minuto, Segundo);
format(tmp3, 20, "%d:%d:%d", Hora, Minuto, Segundo);
format(stri, sizeof(stri), "IPsBanidos/%s.ini",ip);
DOF2_CreateFile(stri);
DOF2_SetString(stri,"Motivo","Errou a senha 5 vezes");
DOF2_SetString(stri,"Admin","iFujiro_Nakombi");
DOF2_SetString(stri,"Data",tmp);
DOF2_SetString(stri,"Hora",tmp3);
DOF2_SetString(stri,"Nick",PlayerName(playerid));
}
return true;
}
ResetPlayerMoney(playerid);
ConsumingMoney[playerid] = 1;
GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
CurrentMoney[playerid] = PlayerInfo[playerid][pCash];
SetPlayerWantedLevel(playerid, WantedPoints[playerid]);
if(PlayerInfo[playerid][pReg] == 0)
{
PlayerInfo[playerid][pLevel] = 2;
PlayerInfo[playerid][pSHealth] = 50;
PlayerInfo[playerid][pPos_x] = 2246.6;
PlayerInfo[playerid][pPos_y] = -1161.9;
PlayerInfo[playerid][pPos_z] = 1029.7;
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
PlayerInfo[playerid][pTeam] = 3;
if(PlayerInfo[playerid][pSex] == 1){SetPlayerSkin(playerid, 250);}else{SetPlayerSkin(playerid, 226);}
new randphone = 1000 + random(8999);//
PlayerInfo[playerid][pPnumber] = randphone;
PlayerInfo[playerid][pPHousekey] = 255;
PlayerInfo[playerid][pPbiskey] = 255;
PlayerInfo[playerid][pConta] = 100;
PlayerInfo[playerid][pReg] = 1;
PlayerInfo[playerid][pEmprego] = 0;
PlayerInfo[playerid][pKills] = 0;
PlayerInfo[playerid][pDeaths] = 0;
ResetPlayerMoney(playerid);
}
if(PlayerInfo[playerid][pWarns] == 1) //1 aviso
{
SendClientMessage(playerid, COLOR_YELLOW, "Sua Conta Jб tem 1 Aviso!");
SendClientMessage(playerid, COLOR_YELLOW, "Se Vocк tiver 3 avisos serб banido automaticamente!");
}
if(PlayerInfo[playerid][pWarns] == 2) //2 avisos
{
SendClientMessage(playerid, COLOR_YELLOW, "Sua Conta Jб tem 2 Avisos!");
SendClientMessage(playerid, COLOR_YELLOW, "Se Vocк tiver 3 avisos serб banido automaticamente!");
}
if(PlayerInfo[playerid][pWarns] >= 3) //3 avisos
{
PlayerInfo[playerid][pWarns] = 0;
}
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
SendClientMessage(playerid, COLOR_YELLOW2, "Seja bem vindo ao: Brasil GamerTroll [RPG v1.0]");
printf("%s logou no server.",PlayerName(playerid));
new Info[6][10];
split(PlayerInfo[playerid][pLastLogin],Info,'/');
format(string2, sizeof(string2), "{FFFFFF}Seu ъltimo login foi no dia %d/%d/%d horбrio %d:%d:%d",strval(Info[0]),strval(Info[1]),strval(Info[2]),strval(Info[3]),strval(Info[4]),strval(Info[5]));
SendClientMessage(playerid, COLOR_AZULBB,string2);
DateProp(playerid);
new dia,mes,ano,hora,mins,seg,string3[20];
getdate(ano,mes,dia);
gettime(hora,mins,seg);
format(string3, sizeof(string3),"%d/%d/%d/%d/%d/%d",dia,mes,ano,hora,mins,seg);
strmid(PlayerInfo[playerid][pLastLogin],string3,0,strlen(string3),255);
} // LINHA 16337
if (AdmCheck(playerid) == 0 && PlayerInfo[playerid][pAdmin] > 0)//teste adminfo // LINHA 16338
{
PlayerInfo[playerid][pAdmin] = 0;
SendClientMessage(playerid, COLOR_YELLOW, "{0082BF}[BGT]: Vocк nгo й mais um Administrador.");
}
if (HelperCheck(playerid) == 0 && PlayerInfo[playerid][pHelper] > 0)//teste adminfo // LINHA 16343
{
PlayerInfo[playerid][pHelper] = 0;
SendClientMessage(playerid, COLOR_YELLOW, "{0082BF}[BGT]: Vocк nгo й mais um Helper.");
}
else if(PlayerInfo[playerid][pAdmin] > 0) // LINHA 16348
{
format(string2, sizeof(string2), "{0082BF}[BGT]: Vocк Logou Como Administrador Level [%d].",PlayerInfo[playerid][pAdmin]);
SendClientMessage(playerid, COLOR_YELLOW,string2);
}