SA-MP Forums Archive
[Help] DOF2 Closing the server - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] DOF2 Closing the server (/showthread.php?tid=661577)



[Help] DOF2 Closing the server - ApolloScripter - 08.12.2018

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(playeridjogadorsizeof(jogador));
    
format(Archivessizeof(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(playeridjogadorsizeof(jogador));
    
format(Archivessizeof(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



Re: [Help] DOF2 Closing the server - Logic_ - 08.12.2018

The server is probably crashing because of "missing file".


Re: [Help] DOF2 Closing the server - ApolloScripter - 08.12.2018

Quote:
Originally Posted by Logic_
Посмотреть сообщение
The server is probably crashing because of "missing file".
Oh, do you know how to fix it? The folder created in scriptfiles is not automatic? or do I have to create manually?