[20:47:48] [debug] Server crashed while executing Godfather.amx
[20:47:48] [debug] AMX backtrace:
[20:47:48] [debug] #0 native fwrite () [0809aa10] from samp03svr
[20:47:48] [debug] #1 0009dc08 in public SaveZones () from Godfather.amx
[20:47:48] [debug] #2 000515e0 in public OnPlayerSpawn (0x00000006) from Godfather.amx
[20:47:48] [debug] Native backtrace:
[20:47:48] [debug] #0 f739b09b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[20:47:48] [debug] #1 f73962d2 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[20:47:48] [debug] #2 f7396ebc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[20:47:48] [debug] #3 f7397366 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[20:47:48] [debug] #4 f739acec in ?? () from plugins/crashdetect.so
[20:47:48] [debug] #5 f7767410 in ?? ()
[20:47:48] [debug] #6 f7767430 in ?? ()
[20:47:48] [debug] #7 f74c8951 in gsignal () from /lib32/libc.so.6
[20:47:48] [debug] #8 f74cbd82 in abort () from /lib32/libc.so.6
[20:47:48] [debug] #9 f74c17b8 in __assert_fail () from /lib32/libc.so.6
[20:47:48] [debug] #10 0809a63c in ?? () from samp03svr
[20:47:48] [debug] #11 0809aa9f in ?? () from samp03svr
[20:47:48] [debug] #12 08093d84 in ?? () from samp03svr
[20:47:48] [debug] #13 f7393b9c in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[20:47:48] [debug] #14 f7399d38 in ?? () from plugins/crashdetect.so
[20:47:48] [debug] #15 f73a01f8 in amx_Exec () from plugins/crashdetect.so
[20:47:48] [debug] #16 f7396218 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[20:47:48] [debug] #17 f7399aa9 in ?? () from plugins/crashdetect.so
[20:47:48] [debug] #18 080a3939 in ?? () from samp03svr
[20:47:48] [debug] #19 080aebfa in ?? () from samp03svr
[20:47:48] [debug] #20 08071a92 in ?? () from samp03svr
[20:47:48] [debug] #21 08071bc2 in ?? () from samp03svr
[20:47:48] [debug] #22 0807ba20 in ?? () from samp03svr
[20:47:48] [debug] #23 080acbfd in ?? () from samp03svr
[20:47:48] [debug] #24 080acda2 in ?? () from samp03svr
[20:47:48] [debug] #25 080a81ae in ?? () from samp03svr
[20:47:48] [debug] #26 f74b4bd6 in __libc_start_main () from /lib32/libc.so.6
[20:47:48] [debug] #27 0804b4a1 in ?? () from samp03svr
public SaveZones()
{
new idx;
new File: file2;
while (idx < sizeof(ZoneInfo))
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%s|%f|%f|%f|%f|%d\n",
ZoneInfo[idx][zOwner],
ZoneInfo[idx][zMinX],
ZoneInfo[idx][zMinY],
ZoneInfo[idx][zMaxX],
ZoneInfo[idx][zMaxY],
ZoneInfo[idx][zTeam]);
if(idx == 0)
{
file2 = fopen("Altele/gzones.cfg", io_write);
}
else
{
file2 = fopen("Altele/gzones.cfg", io_append);
}
fwrite(file2, coordsstring);
idx++;
fclose(file2);
}
return 1;
}
public SaveZones()
{
new File: file2 = fopen("Altele/gzones.cfg", io_append), coordsstring[128];
for (new idx; idx != sizeof(ZoneInfo); ++idx)
{
format(coordsstring, sizeof(coordsstring), "%s|%f|%f|%f|%f|%d\n", ZoneInfo[idx][zOwner], ZoneInfo[idx][zMinX], ZoneInfo[idx][zMinY], ZoneInfo[idx][zMaxX], ZoneInfo[idx][zMaxY], ZoneInfo[idx][zTeam]);
if (file2) fwrite(file2, coordsstring);
}
if (file2) fclose(file2);
}
for(new i=0; i < sizeof(ZoneInfo); i++)
{
new leadername[MAX_PLAYER_NAME];
GetPlayerName(playerid,leadername,128);
if(togzones[playerid] == 1)
{
GangZoneShowForPlayer(playerid, Zones[i], GetTeamZoneColor(ZoneInfo[i][zTeam]));
if(ZoneInfo[i][zTakeOn] == 1 && takezone == 1) GangZoneFlashForPlayer(playerid, i, COLOR_RED);
SetTimer("ShowZones",3000,0);
}
if(PlayerInfo[playerid][pLeader]==12 && ZoneInfo[i][zTeam] == 12)
{
strmid(ZoneInfo[i][zOwner],leadername,0,strlen(leadername),255);
SaveZones();
}
else if(PlayerInfo[playerid][pLeader]==13 && ZoneInfo[i][zTeam] == 13)
{
strmid(ZoneInfo[i][zOwner],leadername,0,strlen(leadername),255);
SaveZones();
}
else if(PlayerInfo[playerid][pLeader]==14 && ZoneInfo[i][zTeam] == 14)
{
strmid(ZoneInfo[i][zOwner],leadername,0,strlen(leadername),255);
SaveZones();
}
else if(PlayerInfo[playerid][pLeader]==15 && ZoneInfo[i][zTeam] == 15)
{
strmid(ZoneInfo[i][zOwner],leadername,0,strlen(leadername),255);
SaveZones();
}
else if(PlayerInfo[playerid][pLeader]==16 && ZoneInfo[i][zTeam] == 16)
{
strmid(ZoneInfo[i][zOwner],leadername,0,strlen(leadername),255);
SaveZones();
}
else if(PlayerInfo[playerid][pLeader]==17 && ZoneInfo[i][zTeam] == 17)
{
strmid(ZoneInfo[i][zOwner],leadername,0,strlen(leadername),255);
SaveZones();
}
}
pawn Код:
@S4t3K: Yeah, I noticed that later on and I fixed it. |