08.12.2018, 15:39
I have done, or at least tried to make and use DOF2, to storing some integers for a system that I am doing, compiled without problem neither one, however when I enter the GTA the server is closed instantly, and the problem is in the code below , because when removing it, the server comes back in normally, does anyone know why?
PHP код:
//Under OnPlayerConnect
new Archives[70], jogador[MAX_PLAYER_NAME];
GetPlayerName(playerid, jogador, sizeof(jogador));
format(Archives, sizeof(Archives), "Classes/%s.ini", jogador);
if(!fexist(Archives))
{
DOF2_CreateFile(Archives);
DOF2_SetInt(Archives, "ClasseID", 1);
}
else
{
CLASSEide[playerid] = DOF2_GetInt(Archives, "ClassID");
}
PHP код:
// Under OnPlayerDisconnect
new Archives[70], jogador[MAX_PLAYER_NAME];
GetPlayerName(playerid, jogador, sizeof(jogador));
format(Archives, sizeof(Archives), "Classes/%s.ini", jogador);
if(!fexist(Archives))
{
DOF2_CreateFile(Archives);
DOF2_SetInt(Archives, "ClasseID", CLASSEide[playerid]);
DOF2::SaveFile();
}
else
{
DOF2_SetInt(Archives, "ClassID", CLASSEide[playerid]);
DOF2_SaveFile();
}
return 1;