[Help] DOF2 Closing the server
#1

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
Reply
#2

The server is probably crashing because of "missing file".
Reply
#3

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)