stock Load(playerid)
{
Contas(playerid);
SetPlayerScore(playerid, DOF2_GetInt(arquivo_conta, "Level"));
return 1;
}
stock Contas(playerid)
{
new
Arquivo[50],
Nome_S[MAX_PLAYER_NAME]
;
GetPlayerName(playerid, Nome_S, sizeof(Nome_S));
format(Arquivo, sizeof(Arquivo), "Contas/%s.ini", Nome_S);
}
stock Salvar(playerid)
{
Contas(playerid);
if (!DOF2_FileExists(Arquivo))
{
DOF2_CreateFile(Arquivo);
Salvar(playerid);
return 1;
}
DOF2_SetInt(Arquivo, "Level", GetPlayerScore(playerid));
DOF2_SaveFile();
return 1;
}
C:\Users\cRc\Desktop\Untitled.pwn(287) : error 017: undefined symbol "Arquivo"
C:\Users\cRc\Desktop\Untitled.pwn(289) : error 017: undefined symbol "Arquivo"
C:\Users\cRc\Desktop\Untitled.pwn(293) : error 017: undefined symbol "Arquivo"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
stock Load(playerid)
{
SetPlayerScore(playerid, DOF2_GetInt(Contas(playerid), "Level"));
return 1;
}
stock Contas(playerid)
{
new
Arquivo[50],
Nome_S[MAX_PLAYER_NAME]
;
GetPlayerName(playerid, Nome_S, sizeof(Nome_S));
format(Arquivo, sizeof(Arquivo), "Contas/%s.ini", Nome_S);
return Arquivo;
}
stock Salvar(playerid)
{
if(!DOF2_FileExists(Contas(playerid)))
{
DOF2_CreateFile(Contas(playerid));
Salvar(playerid);
return 1;
}
DOF2_SetInt(Contas(playerid), "Level", GetPlayerScore(playerid));
DOF2_SaveFile();
return 1;
}
stock Ler(playerid)
{
SetPlayerPos(playerid, DOF2_GetInt(Contas(playerid), "Pos"));
return 1;
}
stock Salvar(playerid)
{
if(!DOF2_FileExists(Contas(playerid)))
{
DOF2_CreateFile(Contas(playerid));
Salvar(playerid);
return 1;
}
DOF2_SetInt(Contas(playerid), "Pos", GetPlayerPos(playerid, Px, Py, Pz));
DOF2_SaveFile();
return 1;
}
SetPlayerPos(playerid, DOF2_GetInt(Contas(playerid), "Pos"));
stock Ler(playerid)
{
SetPlayerPos(playerid, DOF2_GetFloat(Contas(playerid), "Pos"));
return 1;
}
stock Salvar(playerid)
{
if(!DOF2_FileExists(Contas(playerid)))
{
DOF2_CreateFile(Contas(playerid));
Salvar(playerid);
return 1;
}
DOF2_SetFloat(Contas(playerid), "Pos", GetPlayerPos(playerid, Px, Py, Pz));
DOF2_SaveFile();
return 1;
}
// OnPlayerDisconnect //
new Float: Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
DOF2_SetFloat(Contas(playerid),"CoordenadaX",Pos[0]);
DOF2_SetFloat(Contas(playerid),"CoordenadaY",Pos[1]);
DOF2_SetFloat(Contas(playerid),"CoordenadaZ",Pos[2]);
DOF2_SaveFile();
// OnPlayerSpawn // ou // OnPlayerConnect //
SetPlayerPos(playerid,DOF2_GetFloat(Contas(playerid),"CoordenadaX"),DOF2_GetFloat(Contas(playerid),"CoordenadaY"),DOF2_GetFloat(Contas(playerid),"CoordenadaZ"));
GetPlayerPos(playerid, Px, Py, Pz);
DOF2_SetFloat(Contas(playerid), "PosX", Px);
DOF2_SetFloat(Contas(playerid), "PosY", Py);
DOF2_SetFloat(Contas(playerid), "PosZ", Pz);
SetPlayerPos(playerid, DOF2_GetFloat(Contas(playerid), "PosX"), DOF2_GetFloat(Contas(playerid), "PosY"), DOF2_GetFloat(Contas(playerid), "PosZ"));
stock Ler(playerid)
{
SetPlayerPos(playerid,
DOF2_GetFloat(Contas(playerid), "PosX"),
DOF2_GetFloat(Contas(playerid), "PosY"),
DOF2_GetFloat(Contas(playerid), "PosZ"));
return 1;
}
stock Salvar(playerid)
{
if(!DOF2_FileExists(Contas(playerid)))
{
DOF2_CreateFile(Contas(playerid));
Salvar(playerid);
return 1;
}
DOF2_SetFloat(Contas(playerid), "Pos", GetPlayerPos(playerid, Px, Py, Pz));
DOF2_SaveFile();
return 1;
}
Fiz assim e compilou.
pawn Код:
|
stock Salvar(playerid)
{
if(!DOF2_FileExists(Contas(playerid)))
{
DOF2_CreateFile(Contas(playerid));
Salvar(playerid);
return 1;
}
GetPlayerPos(playerid, Px, Py, Pz);
DOF2_SetFloat(Contas(playerid), "PosX", Px);
DOF2_SetFloat(Contas(playerid), "PosY", Py);
DOF2_SetFloat(Contas(playerid), "PosZ", Pz);
DOF2_SaveFile();
return 1;
}