Beiträge von Apokrate


    - WBB 4.1 Lizenz -



    WBB 4.1 Lizenz

    • Accountverkauf
    • Folgende Plugins mitenthalten:

      • Modern Shoutbox
      • Mehrere Ranggrafiken
      • Letzten X Beitraege
      • Wer War Online

    Preisvorstellung: 60€
    Bei weiteren Fragen einfach via PN oder hier im Thread melden.
    ______
    Unverbindlicher Hinweis: Die Sicherheit einer Transaktion kann am besten durch die Einschaltung eines Mittelsmannes gewaehrleistet werden. Weitere Informationen dazu gibt es hier.

    Der Code:
    new fV = IsAFraktionsVeh(vehicleid);
    if(Spieler[playerid][Gang] != fVehicle[fV][vehFraktion])
    {
    RemovePlayerFromVehicle(playerid);
    new Float:slx, Float:sly, Float:slz;
    GetPlayerPos(playerid, slx, sly, slz);
    SetPlayerPos(playerid, slx, sly, slz+1);
    }


    [22:44:55] [debug] Run time error 4: "Array index out of bounds"
    [22:44:55] [debug] Accessing element at index 65535 past array upper bound 449
    [22:44:55] [debug] AMX backtrace:
    [22:44:55] [debug] #0 000333c4 in public OnPlayerStateChange (playerid=0, newstate=2, oldstate=1) at \gamemodes\selfmade.pwn:3958
    [22:44:55] [debug] Run time error 4: "Array index out of bounds"
    [22:44:55] [debug] Accessing element at index 65535 past array upper bound 449
    [22:44:55] [debug] AMX backtrace:
    [22:44:55] [debug] #0 000333c4 in public OnPlayerStateChange (playerid=1, newstate=2, oldstate=1) at \gamemodes\selfmade.pwn:3958
    [22:44:55] [debug] Run time error 4: "Array index out of bounds"
    [22:44:55] [debug] Accessing element at index 65535 past array upper bound 449
    [22:44:55] [debug] AMX backtrace:
    [22:44:55] [debug] #0 000333c4 in public OnPlayerStateChange (playerid=2, newstate=2, oldstate=1) at \gamemodes\selfmade.pwn:3958

    Klappt.


    _____________________________________________


    stock IsAFraktionsVeh(vehicleid)
    {
    for(new fV;fV<MAX_FVEHS;fV++)
    {
    if(vehicleid == fVehicle[fV][vehID])return fV;
    }
    return INVALID_VEHICLE_ID;
    }


    [22:25:07] [debug] Run time error 4: "Array index out of bounds"
    [22:25:07] [debug] Accessing element at index 65535 past array upper bound 449
    [22:25:07] [debug] AMX backtrace:
    [22:25:07] [debug] #0 000290d4 in public OnPlayerStateChange (0x00000000, 0x00000002, 0x00000001) from selfmade.amx
    [22:25:07] [debug] Run time error 4: "Array index out of bounds"
    [22:25:07] [debug] Accessing element at index 65535 past array upper bound 449
    [22:25:07] [debug] AMX backtrace:
    [22:25:07] [debug] #0 000290d4 in public OnPlayerStateChange (0x00000001, 0x00000002, 0x00000001) from selfmade.amx
    [22:25:07] [debug] Run time error 4: "Array index out of bounds"
    [22:25:07] [debug] Accessing element at index 65535 past array upper bound 449
    [22:25:07] [debug] AMX backtrace:
    [22:25:07] [debug] #0 000290d4 in public OnPlayerStateChange (0x00000002, 0x00000002, 0x00000001) from selfmade.amx



    MAX_FVEHS ist auf 450.


    ?(

    oneText[playerid] = CreatePlayerTextDraw(playerid,497.333496, 173.392700, "Kills: 31 Tode: 69");
    PlayerTextDrawBackgroundColor(playerid,oneText[playerid], 51);
    PlayerTextDrawFont(playerid,oneText[playerid], 1);
    PlayerTextDrawLetterSize(playerid,oneText[playerid], 0.310000, 1.600000);
    PlayerTextDrawColor(playerid,oneText[playerid], -1);
    PlayerTextDrawSetOutline(playerid,oneText[playerid], 1);
    PlayerTextDrawSetProportional(playerid,oneText[playerid], 1);
    PlayerTextDrawSetShadow(playerid,oneText[playerid], 0);


    Textdraw0[playerid] = CreatePlayerTextDraw(playerid, 546.000183, 24.888887, "EXP: 0 / 0");
    PlayerTextDrawBackgroundColor(playerid,Textdraw0[playerid], 51);
    PlayerTextDrawFont(playerid,Textdraw0[playerid], 1);
    PlayerTextDrawLetterSize(playerid,Textdraw0[playerid], 0.234666, 1.222518);
    PlayerTextDrawColor(playerid,Textdraw0[playerid], -1);
    PlayerTextDrawSetOutline(playerid,Textdraw0[playerid], 1);
    PlayerTextDrawSetProportional(playerid,Textdraw0[playerid], 1);


    Wenn ich "oneText" unter Textdraw0 habe, dann wird Textdraw0 nicht mehr angezeigt. Anders rum genau so.
    Es wird also immer irgendwie nur eins angezeigt.


    An sich sollte das Ganze "PlayerTextDrawShow" richtig sein.

    [22:12:07] LoadGangfightZones: 9 rows
    [22:12:07] Lade 0
    [22:12:07] Lade 1
    [22:12:07] Lade 2
    [22:12:07] Lade 3
    [22:12:07] Lade 4
    [22:12:07] Lade 5
    [22:12:07] Lade 6
    [22:12:07] Lade 7
    [22:12:07] Lade 8
    [22:12:07] Rufe SaveGangfightZones auf.
    [22:12:07] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='0'
    [22:12:07] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='1'
    [22:12:07] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='2'
    [22:12:07] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='3'
    [22:12:07] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='4'
    [22:12:08] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='5'
    [22:12:08] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='6'
    [22:12:08] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='7'
    [22:12:08] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='8'
    [22:12:08] Fertig.


    [22:12:17] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='0'
    [22:12:17] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='1'
    [22:12:17] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='2'
    [22:12:17] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='3'
    [22:12:17] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='4'
    [22:12:17] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='5'
    [22:12:17] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='6'
    [22:12:17] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='7'
    [22:12:17] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='8'
    [22:12:17] Fertig.
    [22:12:19] [debug] Server crashed while executing selfmade.amx
    [22:12:19] [debug] AMX backtrace:
    [22:12:19] [debug] #0 native mysql_close () [56ead920] from mysql.DLL
    [22:12:19] [debug] #1 00013c58 in public OnGameModeExit () from selfmade.amx
    [22:12:19] [debug] Native backtrace:
    [22:12:19] [debug] #0 100379cc in ?? () from LIBMYSQL.dll
    [22:12:19] [debug] #1 10037a7a in ?? () from LIBMYSQL.dll


    [22:12:24] LoadGangfightZones: 9 rows
    [22:12:24] Lade 0
    [22:12:24] Lade 1
    [22:12:24] Lade 2
    [22:12:24] Lade 3
    [22:12:24] Lade 4
    [22:12:24] Lade 5
    [22:12:24] Lade 6
    [22:12:24] Lade 7
    [22:12:24] Lade 8
    [22:12:24] Rufe SaveGangfightZones auf.
    [22:12:24] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='0'
    [22:12:24] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='1'
    [22:12:24] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='2'
    [22:12:24] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='3'
    [22:12:24] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='4'
    [22:12:24] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='5'
    [22:12:24] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='6'
    [22:12:24] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='7'
    [22:12:24] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='0', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='0', `GFPauseTime`='0', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='8'
    [22:12:24] Fertig.

    Hatte es ausersehen doppelt drin.
    Habs dann raus gemacht und neu probiert.
    Erst Datenbank geleert, dann gestartet und neugestartet.

    [19:43:55] LoadGangfightZones: 0 rows
    [19:43:55] Erstelle 0 neu
    [19:43:55] Erstelle 1 neu
    [19:43:55] Erstelle 2 neu
    [19:43:55] Erstelle 3 neu
    [19:43:55] Erstelle 4 neu
    [19:43:55] Erstelle 5 neu
    [19:43:55] Erstelle 6 neu
    [19:43:55] Erstelle 7 neu
    [19:43:55] Erstelle 8 neu
    [19:43:55] Rufe SaveGangfightZones auf.
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='0'
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='1'
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='2'
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='3'
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='4'
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='5'
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='6'
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='7'
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='8'
    [19:43:55] Fertig.


    [19:43:55] Lade 0
    [19:43:55] Lade 1
    [19:43:55] Lade 2
    [19:43:55] Lade 3
    [19:43:55] Lade 4
    [19:43:55] Lade 5
    [19:43:55] Lade 6
    [19:43:55] Lade 7
    [19:43:55] Lade 8
    [19:43:55] Lade 9
    [19:43:55] [debug] Run time error 4: "Array index out of bounds"
    [19:43:55] [debug] Accessing element at index 9 past array upper bound 8
    [19:43:55] [debug] AMX backtrace:
    [19:43:55] [debug] #0 000128c4 in public LoadGangfightZones () from selfmade.amx


    Restart:


    [20:45:09] LoadGangfightZones: 0 rows
    [20:45:09] Erstelle 0 neu
    [20:45:09] Erstelle 1 neu
    [20:45:09] Erstelle 2 neu
    [20:45:09] Erstelle 3 neu
    [20:45:09] Erstelle 4 neu
    [20:45:09] Erstelle 5 neu
    [20:45:10] Erstelle 6 neu
    [20:45:10] Erstelle 7 neu
    [20:45:10] Erstelle 8 neu
    [20:45:10] Rufe SaveGangfightZones auf.
    [20:45:10] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='0'
    [20:45:10] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='1'
    [20:45:10] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='2'
    [20:45:10] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='3'
    [20:45:10] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='4'
    [20:45:10] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='5'
    [20:45:10] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='6'
    [20:45:10] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='7'
    [20:45:10] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='8'
    [20:45:10] Fertig.

    [19:43:55] LoadGangfightZones: 0 rows
    [19:43:55] Erstelle 0 neu
    [19:43:55] Erstelle 1 neu
    [19:43:55] Erstelle 2 neu
    [19:43:55] Erstelle 3 neu
    [19:43:55] Erstelle 4 neu
    [19:43:55] Erstelle 5 neu
    [19:43:55] Erstelle 6 neu
    [19:43:55] Erstelle 7 neu
    [19:43:55] Erstelle 8 neu
    [19:43:55] Rufe SaveGangfightZones auf.
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='0'
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='1'
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='2'
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='3'
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='4'
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='5'
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='6'
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='7'
    [19:43:55] UPDATE `gangzonen` SET `GFOwnerID`='0', `GFGegnerID`='-1', `GFOwnerPoints`='0', `GFGegnerPoints`='0', `GFRunningTime`='-1', `GFPauseTime`='-1', `GFFlaggenOwnerA`='0', `GFFlaggenOwnerB`='0', `GFFlaggenOwnerC`='0' WHERE `GangzoneID`='8'
    [19:43:55] Fertig.


    [19:43:55] LoadGangfightZones: 18 rows
    [19:43:55] Lade 0
    [19:43:55] Lade 1
    [19:43:55] Lade 2
    [19:43:55] Lade 3
    [19:43:55] Lade 4
    [19:43:55] Lade 5
    [19:43:55] Lade 6
    [19:43:55] Lade 7
    [19:43:55] Lade 8
    [19:43:55] Lade 9
    [19:43:55] [debug] Run time error 4: "Array index out of bounds"
    [19:43:55] [debug] Accessing element at index 9 past array upper bound 8
    [19:43:55] [debug] AMX backtrace:
    [19:43:55] [debug] #0 000128c4 in public LoadGangfightZones () from selfmade.amx


    Die Tabelle wurde länger.

    mysql_tquery(dbhandle, "SELECT * FROM `gangzonen`", "LoadGangfightZones", "");


    forward LoadGangfightZones();
    public LoadGangfightZones()
    {
    new rows = cache_num_rows(), string[128];
    printf("LoadGangfightZones: %d rows", rows);
    for(new i=0;i<rows;i++)
    {
    printf("Lade %d", i);
    Gangzonen[i][GFOwnerID] = cache_get_field_content_int(i,"GFOwnerID",dbhandle);
    Gangzonen[i][GFGegnerID] = cache_get_field_content_int(i,"GFGegnerID",dbhandle);
    Gangzonen[i][GFOwnerPoints] = cache_get_field_content_int(i,"GFOwnerPoints",dbhandle);
    Gangzonen[i][GFGegnerPoints] = cache_get_field_content_int(i,"GFGegnerPoints",dbhandle);
    Gangzonen[i][GFRunningTime] = cache_get_field_content_int(i,"GFRunningTime",dbhandle);
    Gangzonen[i][GFPauseTime] = cache_get_field_content_int(i,"GFPauseTime",dbhandle);
    Gangzonen[i][GFFlaggenOwnerA] = cache_get_field_content_int(i,"GFFlaggenOwnerA",dbhandle);
    Gangzonen[i][GFFlaggenOwnerB] = cache_get_field_content_int(i,"GFFlaggenOwnerB",dbhandle);
    Gangzonen[i][GFFlaggenOwnerC] = cache_get_field_content_int(i,"GFFlaggenOwnerC",dbhandle);
    }
    for(new i=rows;i<sizeof(Gangzonen);i++)
    {
    printf("Erstelle %d neu", i);
    Gangzonen[i][GFOwnerID] = 0;
    Gangzonen[i][GFGegnerID] = -1;
    Gangzonen[i][GFOwnerPoints] = 0;
    Gangzonen[i][GFGegnerPoints] = 0;
    Gangzonen[i][GFRunningTime] = -1;
    Gangzonen[i][GFPauseTime] = -1;
    format(string, sizeof(string), "INSERT INTO `gangzonen` (`GangzoneID`) VALUES ('%d')", i);
    mysql_query(dbhandle, string);
    }
    print("Rufe SaveGangfightZones auf.");
    SaveGangfightZones();
    return 1;
    }



    forward SaveGangfightZones();
    public SaveGangfightZones()
    {
    new var[526];
    for(new i = 0; i < sizeof(Gangzonen); i++)
    {
    format(var, sizeof(var), "UPDATE `gangzonen` SET `GFOwnerID`='%d', `GFGegnerID`='%d', `GFOwnerPoints`='%d', `GFGegnerPoints`='%d', `GFRunningTime`='%d', `GFPauseTime`='%d', `GFFlaggenOwnerA`='%d', `GFFlaggenOwnerB`='%d', `GFFlaggenOwnerC`='%d' WHERE `GangzoneID`='%d'",
    Gangzonen[i][GFOwnerID],
    Gangzonen[i][GFGegnerID],
    Gangzonen[i][GFOwnerPoints],
    Gangzonen[i][GFGegnerPoints],
    Gangzonen[i][GFRunningTime],
    Gangzonen[i][GFPauseTime],
    Gangzonen[i][GFFlaggenOwnerA],
    Gangzonen[i][GFFlaggenOwnerB],
    Gangzonen[i][GFFlaggenOwnerC],
    i);
    print(var);
    mysql_query(dbhandle, var);
    }
    print("Fertig.");
    return 1;
    }
    Nur das.


    Gangzonen[i][GFOwnerID] = 0;
    Gangzonen[i][GFGegnerID] = -1;
    Gangzonen[i][GFOwnerPoints] = 0;
    Gangzonen[i][GFGegnerPoints] = 0;
    Gangzonen[i][GFRunningTime] = -1;
    Gangzonen[i][GFPauseTime] = -1;


    Das wird irgendwie nicht "erstellt".


    Bzw beim Saven wird es mir falsch in der Datenbank angezeigt.


    Alles wird auf 0 gestzt.


    Hier mein Savepublic:


    forward SaveGangfightZones();
    public SaveGangfightZones()
    {
    new string[128];
    for(new i = 0; i < sizeof(Gangzonen); i++)
    {
    format(string, sizeof(string), "SELECT * FROM `gangzonen` WHERE `GangzoneID` = '%d'", i);
    mysql_query(dbhandle, string);
    mysql_store_result();
    if(mysql_num_rows() == 0)
    {
    format(string, sizeof(string), "INSERT INTO `gangzonen` (`GangzoneID`) VALUES ('%d')", i);
    mysql_query(dbhandle, string);
    }
    new var[526];
    format(var, sizeof(var), "UPDATE `gangzonen` SET `GFOwnerID`='%d', `GFGegnerID`='%d', `GFOwnerPoints`='%d', `GFGegnerPoints`='%d', `GFRunningTime`='%d', `GFPauseTime`='%d', `GFFlaggenOwnerA`='%d', `GFFlaggenOwnerB`='%d', `GFFlaggenOwnerC`='%d' WHERE `GangzoneID`='%d'",
    Gangzonen[i][GFOwnerID],
    Gangzonen[i][GFGegnerID],
    Gangzonen[i][GFOwnerPoints],
    Gangzonen[i][GFGegnerPoints],
    Gangzonen[i][GFRunningTime],
    Gangzonen[i][GFPauseTime],
    Gangzonen[i][GFFlaggenOwnerA],
    Gangzonen[i][GFFlaggenOwnerB],
    Gangzonen[i][GFFlaggenOwnerC],
    i);
    mysql_query(dbhandle, var);
    }
    mysql_free_result();
    return 1;
    }

    Ich will es so machen, dass wenn keine Einträge in der Datenbank sind, erstmal nur das "geladen" wird, was ich festgelegt habe.
    Ist aber etwas in der Datenbank vorhanden, so will ich das aus der Datenbank laden.


    Mein Code:

    mysql_tquery(dbhandle, "SELECT * FROM `gangzonen`", "LoadGangfightZones", "");


    forward LoadGangfightZones();
    public LoadGangfightZones()
    {
    new rows = cache_num_rows();
    for(new i=0;i<rows;i++)
    {
    Gangzonen[i][GFOwnerID] = 0;
    Gangzonen[i][GFGegnerID] = -1;
    Gangzonen[i][GFOwnerPoints] = 0;
    Gangzonen[i][GFGegnerPoints] = 0;
    Gangzonen[i][GFRunningTime] = -1;
    Gangzonen[i][GFPauseTime] = -1;

    if(rows != 0)
    {
    Gangzonen[i][GFOwnerID] = cache_get_field_content_int(i,"GFOwnerID",dbhandle);
    Gangzonen[i][GFGegnerID] = cache_get_field_content_int(i,"GFGegnerID",dbhandle);
    Gangzonen[i][GFOwnerPoints] = cache_get_field_content_int(i,"GFOwnerPoints",dbhandle);
    Gangzonen[i][GFGegnerPoints] = cache_get_field_content_int(i,"GFGegnerPoints",dbhandle);
    Gangzonen[i][GFRunningTime] = cache_get_field_content_int(i,"GFRunningTime",dbhandle);
    Gangzonen[i][GFPauseTime] = cache_get_field_content_int(i,"GFPauseTime",dbhandle);
    Gangzonen[i][GFFlaggenOwnerA] = cache_get_field_content_int(i,"GFFlaggenOwnerA",dbhandle);
    Gangzonen[i][GFFlaggenOwnerB] = cache_get_field_content_int(i,"GFFlaggenOwnerB",dbhandle);
    Gangzonen[i][GFFlaggenOwnerC] = cache_get_field_content_int(i,"GFFlaggenOwnerC",dbhandle);
    }
    }
    return 1;
    }

    Könnte man das Problem nicht so lösen, dass man i als 1 definiert. Also in der Schleife. Jeffry:


    forward LoadClans();
    public LoadClans()
    {
    new rows = cache_num_rows();
    for(new i=1;i<rows;i++)
    {
    Clan[i][cID] = cache_get_field_content_int(i,"ID",dbhandle);
    cache_get_field_content(i,"name",Clan[i][cName],dbhandle,32);
    cache_get_field_content(i,"Leader",Clan[i][cLeader],dbhandle,32);
    Clan[i][cMitglieder] = cache_get_field_content_int(i,"Mitglieder",dbhandle);
    Clan[i][cLevel] = cache_get_field_content_int(i,"level",dbhandle);
    Clan[i][cGeld] = cache_get_field_content_int(i,"geld",dbhandle);
    Clan[i][cEXP] = cache_get_field_content_int(i,"EXP",dbhandle);
    Clan[i][cSiege] = cache_get_field_content_int(i,"Siege",dbhandle);
    Clan[i][cNiederlagen] = cache_get_field_content_int(i,"Niederlagen",dbhandle);
    Clan[i][cUnentschieden] = cache_get_field_content_int(i,"Unentschieden",dbhandle);
    printf("Clan ID: %i | Name: %s | Leader: %s | Mitglieder: %i | Level: %i | Geld: %i | EXP: %i | S: %i N: %i U: %i",Clan[i][cID], Clan[i][cName], Clan[i][cLeader], Clan[i][cMitglieder], Clan[i][cLevel],Clan[i][cGeld],
    Clan[i][cEXP],Clan[i][cSiege],Clan[i][cNiederlagen],Clan[i][cUnentschieden]);
    }
    return 1;
    }