[Ajuda] Erro no salvamento das equipes - 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: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Erro no salvamento das equipes (
/showthread.php?tid=586840)
Erro no salvamento das equipes -
TheModern - 25.08.2015
O que falta nesse cуdigo para salvar as Equipes? O sistema de salvamento estб dando erro, quando usa o sistema reinicia o servidor
pawn Код:
if(!Spawned[playerid])
{
Spawned[playerid] = true;
new NickName[MAX_PLAYER_NAME],text[100],string[100];
GetPlayerName(playerid,NickName,sizeof(NickName));
format(text,sizeof(text),"/Equipes/%s.txt",NickName);
if(!Fini_Exists(text))
{
Fini_Create(text);
Fini_OpenFile(text);
Fini_SetStr("RecrutaDeOutroPlayer",PlayerRecrutaDeOutroPlayer[playerid]);
Fini_SetStr("NomeEquipe",PlayerEquipe[playerid]);
Fini_SetStr("Tag",EquipeTag[playerid]);
Fini_SetVal("Cor",CorEquipe[playerid]);
Fini_SetFloat("SpawnX",Spawn[playerid][0]);
Fini_SetFloat("SpawnY",Spawn[playerid][1]);
Fini_SetFloat("SpawnZ",Spawn[playerid][2]);
Fini_SetVal("Skin1",SkinEquipe[playerid][0]);
Fini_SetVal("Skin2",SkinEquipe[playerid][1]);
Fini_SetVal("Skin3",SkinEquipe[playerid][2]);
Fini_SetVal("Cargo",RankPlayer[playerid]);
Fini_SetBool("PlayerTemEquipe",PlayerTemEquipe[playerid]);
Fini_SetBool("PlayerMembroEquipe",PlayerMembroEquipe[playerid]);
Fini_SaveFile();
Fini_CloseFile();
}
E da 6 Warnigs:
Код:
C:\Users\Ricardo\Desktop\TMRP\filterscripts\FS_Equipes.pwn(98) : warning 202: number of arguments does not match definition
C:\Users\Ricardo\Desktop\TMRP\filterscripts\FS_Equipes.pwn(108) : warning 213: tag mismatch
C:\Users\Ricardo\Desktop\TMRP\filterscripts\FS_Equipes.pwn(109) : warning 213: tag mismatch
C:\Users\Ricardo\Desktop\TMRP\filterscripts\FS_Equipes.pwn(110) : warning 202: number of arguments does not match definition
C:\Users\Ricardo\Desktop\TMRP\filterscripts\FS_Equipes.pwn(126) : warning 202: number of arguments does not match definition
C:\Users\Ricardo\Desktop\TMRP\filterscripts\FS_Equipes.pwn(542) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
6 Warnings.
Linha 98: Fini_SaveFile();
Linha 108: PlayerTemEquipe[playerid] = (Fini_GetBool("PlayerTemEquipe") == 1) ? true : false;
Linha 109: PlayerMembroEquipe[playerid] = (Fini_GetBool("PlayerMembroEquipe") == 1) ? true : false;
Linha 110: Fini_SaveFile();
Linha 126: Fini_SaveFile();
Linha 542: Fini_SaveFile();