Hallo Community,
ich habe ein problem, sobald wir unseren Server per /restart restarten, dann speichern sich die Spieler nicht... oder sie laden sich nicht richtig...
Das ist unser Code:
Code
public OnGameModeExit()
{
FrakAutosSpeichern();
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i) /*&& SpielerInfo[i][uEingeloggt] == 1*/)
{
if(Restart == 0)
{
AccountSpeichern(i);
}
else
{
AccountSpeichern(i);
for(new x = 0; x < 3; x++) if(SpielerAuto[i][x][aID] > -1) DestroyVehicle(SpielerAuto[i][x][aID]);
}
}
}
return 1;
Alles anzeigen
Code
cmd:restart(playerid,params[])
{
new str[265];
if(SpielerInfo[playerid][uAdmin] < 3) return KeineRechte(playerid);
Restart = 1;
SetTimer("Restartserver",5000,0);
format(str,sizeof(str),"Administrator %s restartet den Server! Reststart in 5 Sekunden!",PlayerName(playerid));
SendClientMessageToAll(COLOR_LIGHTBLUE,str);
return 1;
}
Sobald wir den Server schließen per console dann speichert sich aber alles normal ab... woran kann es liegen?
//Edit hb crashdetect eingefügt und in pawno die pawn.cfg in meiner log kommt nach dem restart befehl dieses:
Code
13:05:04] [MySQL] Error (0): Function: mysql_store_result called when no result stored.
[13:05:04] 1 Häuser wurden geladen.
[13:08:50] [connection] 88.67.211.1:59409 requests connection cookie.
[13:08:51] [connection] incoming connection: 88.67.211.1:59409 id: 1
[13:08:51] [join] Andy has joined the server (1:88.67.211.1)
[13:17:11] [connection] 88.67.107.82:54666 requests connection cookie.
[13:17:12] [connection] incoming connection: 88.67.107.82:54666 id: 2
[13:17:13] [join] McGarrett has joined the server (2:88.67.107.82)
[13:17:54] [debug] Run time error 4: "Array index out of bounds"
[13:17:54] [debug] Accessing element at negative index -1
[13:17:54] [debug] AMX backtrace:
[13:17:54] [debug] #0 000123e8 in public SSCANF_OnPlayerDisconnect (playerid=1, reason=1) at C:\Users\morit\Desktop\eee\gamemodes\county.pwn:3027
[13:17:54] [debug] #1 00000924 in public OnPlayerDisconnect (playerid=1, reason=1) at C:\Users\morit\Desktop\eee\pawno\include\sscanf2.inc:229
[13:17:55] [debug] Run time error 4: "Array index out of bounds"
[13:17:55] [debug] Accessing element at negative index -1
[13:17:55] [debug] AMX backtrace:
[13:17:55] [debug] #0 000123e8 in public SSCANF_OnPlayerDisconnect (playerid=2, reason=1) at C:\Users\morit\Desktop\eee\gamemodes\county.pwn:3027
[13:17:55] [debug] #1 00000924 in public OnPlayerDisconnect (playerid=2, reason=1) at C:\Users\morit\Desktop\eee\pawno\include\sscanf2.inc:229
[13:18:07] [MySQL] Connected (0) to 'root'@'127.0.0.1 via TCP/IP'.
[13:18:07] [MySQL] Server Version 5.5.46-0ubuntu0.12.04.2.
[13:18:07] [connection] 127.0.0.1:52379 requests connection cookie.
Alles anzeigen
Bitte um Hilfe
MfG