Hallo,
nunja wenn irgendein User "/sup" eingibt, stürzt der ganze Server ab.
Server log:
[20:26:49] sscanf warning: Strings without a length are deprecated, please add a destination size.
[20:26:49] [debug] Server crashed while executing korsanclan.amx
[20:26:49] [debug] AMX backtrace:
[20:26:49] [debug] #0 native fclose () [0809a550] from samp7301_2674
[20:26:49] [debug] #1 000019f0 in dini_Create (filename[]=@0x0018f984 "") at C:\Users\Admin\Desktop\samp03e_svr_win32\samp03e_svr_win32\pawno\include\Dini.inc:41
[20:26:49] [debug] #2 00083120 in public ocmd_sup (playerid=0, params[]=@0x0018ca58 "") at C:\Users\Admin\Desktop\samp03e_svr_win32\samp03e_svr_win32\gamemodes\korsanclan.pwn:5913
[20:26:49] [debug] #3 00002c44 in public OnPlayerCommandText (playerid=0, cmdtext[]=@0x0018ca2c "") at C:\Users\Admin\Desktop\samp03e_svr_win32\samp03e_svr_win32\pawno\include\ocmd.inc:32
[20:26:49] [debug] System backtrace:
[20:26:49] [debug] #0 f739d0f3 in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[20:26:49] [debug] #1 f7394b61 in _ZN11crashdetect20PrintSystemBacktraceEPv () from plugins/crashdetect.so
[20:26:49] [debug] #2 f7397405 in _ZN11crashdetect15SystemExceptionEPv () from plugins/crashdetect.so
[20:26:49] [debug] #3 f739cc42 in ?? () from plugins/crashdetect.so
[20:26:49] [debug] #4 f76fc400 in ?? ()
[20:26:49] [debug] #5 f74b3f57 in fclose () from /lib32/libc.so.6
[20:26:49] [debug] #6 0809a564 in ?? () from ./samp7301_2674
[20:26:49] [debug] #7 080938e4 in ?? () from ./samp7301_2674
[20:26:49] [debug] #8 f73979d5 in _ZN11crashdetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[20:26:49] [debug] #9 f739b1ca in ?? () from plugins/crashdetect.so
[20:26:49] [debug] #10 f739f136 in amx_Exec () from plugins/crashdetect.so
[20:26:49] [debug] #11 f73978b4 in _ZN11crashdetect9DoAmxExecEPii () from plugins/crashdetect.so
[20:26:49] [debug] #12 f739b203 in ?? () from plugins/crashdetect.so
[20:26:49] [debug] #13 080d2752 in ?? () from ./samp7301_2674
[20:26:49] [debug] #14 f739f267 in amx_Exec () from plugins/crashdetect.so
[20:26:49] [debug] #15 f73978b4 in _ZN11crashdetect9DoAmxExecEPii () from plugins/crashdetect.so
[20:26:49] [debug] #16 f739b203 in ?? () from plugins/crashdetect.so
[20:26:49] [debug] #17 080ace92 in ?? () from ./samp7301_2674
[20:26:49] [debug] #18 080b7ed1 in ?? () from ./samp7301_2674
[20:26:49] [debug] #19 080717b8 in ?? () from ./samp7301_2674
[20:26:49] [debug] #20 080718b2 in ?? () from ./samp7301_2674
[20:26:49] [debug] #21 0807b6d0 in ?? () from ./samp7301_2674
[20:26:49] [debug] #22 080b55fd in ?? () from ./samp7301_2674
[20:26:49] [debug] #23 080b5792 in ?? () from ./samp7301_2674
[20:26:49] [debug] #24 080b10a3 in ?? () from ./samp7301_2674
[20:26:49] [debug] #25 f746eca6 in __libc_start_main () from /lib32/libc.so.6
[20:26:49] [debug] #26 0804b521 in ?? () from ./samp7301_2674
/sup befehl:
ocmd:sup(playerid,params[])
{
new text[256];
if(sscanf(params,"s",text))
{
SendClientMessage(playerid, COLOR_GREY,"[Benutzung]: /sup [text]");
}
else
{
if(Spieler[playerid][Admin] < 1)
{
if(TicketAngenommen[playerid] == 0)
{
new pname[MAX_PLAYER_NAME],save[512], string[128];
GetPlayerName(playerid,pname,sizeof pname);
format(save,sizeof save,"Tickets/%s.ini",pname);
if(!dini_Exists(save) && TicketZeile[playerid] == 0)
{
format(string, sizeof(string), "%s (ID: %d) hat ein Support-Ticket geschrieben", pname, playerid);
for(new i;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(Spieler[i][Admin] > 0)
{
SendClientMessage(i, COLOR_GREEN, string);
}
}
}
SupportTicket[playerid] = 1;
TicketZeile[playerid] = 1;
dini_Create(save);
dini_Set(save,"Suptext",text);
SendClientMessage(playerid, COLOR_GREEN, "Du hast ein Ticket erstellt. Bitte warte auf einen Supporter!");
return 1;
}
else if(TicketZeile[playerid] == 1) // Wenn die erste Zeile schon geschrieben wurde
{
new string2[128];
dini_Set(save, "Suptext2",text);
SendClientMessage(playerid, COLOR_GREEN, "[SUPPORT] Du hast folgendes an dein Ticket anhängt:");
format(string2, sizeof(string2), "%s", text);
SendClientMessage(playerid, COLOR_GREEN, string2);
TicketZeile[playerid] = 2;
return 1;
}
else if(TicketZeile[playerid] == 2) // Wenn bereits 2 Zeilen ausgefüllt sind
{
new string3[128];
dini_Set(save, "Suptext3",text);
SendClientMessage(playerid, COLOR_GREEN, "[SUPPORT] Du hast folgendes an dein Ticket anhängt:");
format(string3, sizeof(string3), "%s", text);
SendClientMessage(playerid, COLOR_GREEN, string3);
TicketZeile[playerid] = 3;
return 1;
}
else if(TicketZeile[playerid] == 3) // Wenn das Ticket bereits 3 Zeilen hat
{
SendClientMessage(playerid, COLOR_GREEN, "[SUPPORT] Dein Ticket ist bereits randgefüllt!");
return 1;
}
}
if(TicketAngenommen[playerid] == 1) // Zum direkten Antworten per /sup , wenn das Ticket angenommen wurde.
{
new pID = DeinSupport[playerid];
new antwort[128], antwort2[128], DerFragende[MAX_PLAYER_NAME], DerSup[MAX_PLAYER_NAME];
GetPlayerName(playerid, DerFragende, sizeof (DerFragende));
GetPlayerName(pID, DerSup, sizeof (DerSup));
format(antwort, sizeof (antwort),"%s schrieb: %s", DerFragende, text);
SendClientMessage(playerid, COLOR_GREEN, antwort);
format(antwort2, sizeof (antwort2), "%s schrieb: %s", DerFragende, text);
SendClientMessage(pID, COLOR_GREEN, antwort2);
}
}
else
{
if(TicketAngenommen[playerid] == 1) // Zum direkten Antworten per /sup , wenn das Ticket angenommen wurde.
{
new pID = DeinSupport[playerid];
new antwort[128], antwort2[128], DerFragende[MAX_PLAYER_NAME], DerSup[MAX_PLAYER_NAME];
GetPlayerName(playerid, DerFragende, sizeof (DerFragende));
GetPlayerName(pID, DerSup, sizeof (DerSup));
format(antwort, sizeof (antwort),"%s schrieb: %s", DerFragende, text);
SendClientMessage(pID, COLOR_GREEN, antwort);
format(antwort2, sizeof (antwort2), "%s schrieb: %s", DerFragende, text);
SendClientMessage(playerid, COLOR_GREEN, antwort2);
}else SendClientMessage(playerid, COLOR_GREEN, "Du bist Supporter - Du kannst kein Ticket schreiben!");
}
}
return 1;
}
Was hab ich falsch gemacht?
Viele Grüße
Akman