Hallo,
Ich bekomme einem Error in meiner Konsole von Crashdetect wenn OnPlayerDisconnect aufgerufen wird:
Code
[13:04:49] [debug] Run time error 4: "Array index out of bounds"
[13:04:49] [debug] Accessing element at index 11 past array upper bound 10
[13:04:49] [debug] AMX backtrace:
[13:04:49] [debug] #0 0003e3d0 in ?? (0x00000000, 0x00000001) from neu.amx
[13:04:49] [debug] #1 0000b570 in public SSCANF_OnPlayerDisconnect (0x00000000, 0x00000001) from neu.amx
[13:04:49] [debug] #2 native CallLocalFunction () [080d2870] from samp03svr
[13:04:49] [debug] #3 00000c1c in public Streamer_OnPlayerDisconnect (0x00000000, 0x00000001) from neu.amx
[13:04:49] [debug] #4 000004a0 in public OnPlayerDisconnect (0x00000000, 0x00000001) from neu.amx
An der ganze Sache liegt das zurücksetzen von Variablen, bei Interger kommt kein Fehler aber bei
Boolean und aus dem enum.
killunjail[playerid] = 0;
killunmuteauto[playerid] = 0;
kVEHICLEHIDEMSG[playerid] = 0;
OldMoney{playerid} = 0;
RaceCheckPointCount{playerid} = 0;
SpecX[playerid] = 0;
SpecY[playerid] = 0;
SpecZ[playerid] = 0;
vWorld{playerid} = 0;
Inter{playerid} = 0;
spectatorid{playerid} = 0;
lockedCar{playerid} = 0;
WhatCar{playerid} = 0;
SeatPassengerPos{playerid} = 0;
strdel(PlayerInfo[playerid][sName],0,25);
strdel(PlayerInfo[playerid][sIP],0,16);
PlayerInfo[playerid][sMuteTime]=0;
PlayerInfo[playerid][sJailTime]=0;
PlayerInfo[playerid][sBanned]=0;
strdel(PlayerInfo[playerid][sBannedReason],0,40);
strdel(PlayerInfo[playerid][sBannedFrom],0,40);
PlayerInfo[playerid][sAdminlevel]=0;
PlayerInfo[playerid][sPremium]=0;
PlayerInfo[playerid][sLanguage]=0;
PlayerInfo[playerid][sMoney]=0;
PlayerInfo[playerid][sCargod]=0;
PlayerInfo[playerid][sBoost]=0;
PlayerInfo[playerid][sNos]=0;
PlayerInfo[playerid][sGod]=0;
PlayerInfo[playerid][sRamp]=0;
PlayerInfo[playerid][sAntifall]=0;
PlayerInfo[playerid][sAllowpm]=0;
PlayerInfo[playerid][sAllowgoto]=0;
PlayerInfo[playerid][sPlayTime]=0;
PlayerInfo[playerid][sKills]=0;
PlayerInfo[playerid][sDeaths]=0;
strdel(PlayerInfo[playerid][sLastIP],0,16);
strdel(PlayerInfo[playerid][sRegIP],0,16);
strdel(PlayerInfo[playerid][sRegDate],0,20);
PlayerInfo[playerid][sCookies]=0;
PlayerInfo[playerid][sSkin]=0;
PlayerInfo[playerid][ssethomex]=0;
PlayerInfo[playerid][ssethomey]=0;
PlayerInfo[playerid][ssethomez]=0;
PlayerInfo[playerid][ssethomeang]=0;
PlayerInfo[playerid][sWslot0]=0;
PlayerInfo[playerid][sMslot0]=0;
PlayerInfo[playerid][sWslot1]=0;
PlayerInfo[playerid][sMslot1]=0;
PlayerInfo[playerid][sWslot2]=0;
PlayerInfo[playerid][sMslot2]=0;
PlayerInfo[playerid][sWslot3]=0;
PlayerInfo[playerid][sMslot3]=0;
PlayerInfo[playerid][sWslot4]=0;
PlayerInfo[playerid][sMslot4]=0;
PlayerInfo[playerid][sWslot5]=0;
PlayerInfo[playerid][sMslot5]=0;
PlayerInfo[playerid][sWslot6]=0;
PlayerInfo[playerid][sMslot6]=0;
PlayerInfo[playerid][sWslot7]=0;
PlayerInfo[playerid][sMslot7]=0;
PlayerInfo[playerid][sWslot8]=0;
PlayerInfo[playerid][sMslot8]=0;
PlayerInfo[playerid][sWslot9]=0;
PlayerInfo[playerid][sMslot9]=0;
PlayerInfo[playerid][sWslot10]=0;
PlayerInfo[playerid][sMslot10]=0;
PlayerInfo[playerid][sWslot11]=0;
PlayerInfo[playerid][sMslot11]=0;
PlayerInfo[playerid][sWslot12]=0;
PlayerInfo[playerid][sMslot12]=0;
PlayerInfo[playerid][sVehicleModel]=0;
PlayerInfo[playerid][sColor1]=0;
PlayerInfo[playerid][sColor2]=0;
PlayerInfo[playerid][sPaintjob]=0;
strdel(PlayerInfo[playerid][sPlate],0,30);
PlayerInfo[playerid][sCARMODTYPE_SPOILER]=0;
PlayerInfo[playerid][sCARMODTYPE_HOOD]=0;
PlayerInfo[playerid][sCARMODTYPE_ROOF]=0;
PlayerInfo[playerid][sCARMODTYPE_SIDESKIRT]=0;
PlayerInfo[playerid][sCARMODTYPE_LAMPS]=0;
PlayerInfo[playerid][sCARMODTYPE_NITRO]=0;
PlayerInfo[playerid][sCARMODTYPE_EXHAUST]=0;
PlayerInfo[playerid][sCARMODTYPE_WHEELS]=0;
PlayerInfo[playerid][sCARMODTYPE_STEREO]=0;
PlayerInfo[playerid][sCARMODTYPE_HYDRAULICS]=0;
PlayerInfo[playerid][sCARMODTYPE_FRONT_BUMPER]=0;
PlayerInfo[playerid][sCARMODTYPE_REAR_BUMPER]=0;
PlayerInfo[playerid][sCARMODTYPE_VENT_RIGHT]=0;
PlayerInfo[playerid][sCARMODTYPE_VENT_LEFT]=0;
strdel(PlayerInfo[playerid][sIP],0,16);
PlayerInfo[playerid][sMuteTime]=0;
PlayerInfo[playerid][sJailTime]=0;
PlayerInfo[playerid][sBanned]=0;
strdel(PlayerInfo[playerid][sBannedReason],0,40);
strdel(PlayerInfo[playerid][sBannedFrom],0,40);
PlayerInfo[playerid][sAdminlevel]=0;
PlayerInfo[playerid][sPremium]=0;
PlayerInfo[playerid][sLanguage]=0;
PlayerInfo[playerid][sMoney]=0;
PlayerInfo[playerid][sCargod]=0;
PlayerInfo[playerid][sBoost]=0;
PlayerInfo[playerid][sNos]=0;
PlayerInfo[playerid][sGod]=0;
PlayerInfo[playerid][sRamp]=0;
PlayerInfo[playerid][sAntifall]=0;
PlayerInfo[playerid][sAllowpm]=0;
PlayerInfo[playerid][sAllowgoto]=0;
PlayerInfo[playerid][sPlayTime]=0;
PlayerInfo[playerid][sKills]=0;
PlayerInfo[playerid][sDeaths]=0;
strdel(PlayerInfo[playerid][sLastIP],0,16);
strdel(PlayerInfo[playerid][sRegIP],0,16);
strdel(PlayerInfo[playerid][sRegDate],0,20);
PlayerInfo[playerid][sCookies]=0;
PlayerInfo[playerid][sSkin]=0;
PlayerInfo[playerid][ssethomex]=0;
PlayerInfo[playerid][ssethomey]=0;
PlayerInfo[playerid][ssethomez]=0;
PlayerInfo[playerid][ssethomeang]=0;
PlayerInfo[playerid][sWslot0]=0;
PlayerInfo[playerid][sMslot0]=0;
PlayerInfo[playerid][sWslot1]=0;
PlayerInfo[playerid][sMslot1]=0;
PlayerInfo[playerid][sWslot2]=0;
PlayerInfo[playerid][sMslot2]=0;
PlayerInfo[playerid][sWslot3]=0;
PlayerInfo[playerid][sMslot3]=0;
PlayerInfo[playerid][sWslot4]=0;
PlayerInfo[playerid][sMslot4]=0;
PlayerInfo[playerid][sWslot5]=0;
PlayerInfo[playerid][sMslot5]=0;
PlayerInfo[playerid][sWslot6]=0;
PlayerInfo[playerid][sMslot6]=0;
PlayerInfo[playerid][sWslot7]=0;
PlayerInfo[playerid][sMslot7]=0;
PlayerInfo[playerid][sWslot8]=0;
PlayerInfo[playerid][sMslot8]=0;
PlayerInfo[playerid][sWslot9]=0;
PlayerInfo[playerid][sMslot9]=0;
PlayerInfo[playerid][sWslot10]=0;
PlayerInfo[playerid][sMslot10]=0;
PlayerInfo[playerid][sWslot11]=0;
PlayerInfo[playerid][sMslot11]=0;
PlayerInfo[playerid][sWslot12]=0;
PlayerInfo[playerid][sMslot12]=0;
PlayerInfo[playerid][sVehicleModel]=0;
PlayerInfo[playerid][sColor1]=0;
PlayerInfo[playerid][sColor2]=0;
PlayerInfo[playerid][sPaintjob]=0;
strdel(PlayerInfo[playerid][sPlate],0,30);
PlayerInfo[playerid][sCARMODTYPE_SPOILER]=0;
PlayerInfo[playerid][sCARMODTYPE_HOOD]=0;
PlayerInfo[playerid][sCARMODTYPE_ROOF]=0;
PlayerInfo[playerid][sCARMODTYPE_SIDESKIRT]=0;
PlayerInfo[playerid][sCARMODTYPE_LAMPS]=0;
PlayerInfo[playerid][sCARMODTYPE_NITRO]=0;
PlayerInfo[playerid][sCARMODTYPE_EXHAUST]=0;
PlayerInfo[playerid][sCARMODTYPE_WHEELS]=0;
PlayerInfo[playerid][sCARMODTYPE_STEREO]=0;
PlayerInfo[playerid][sCARMODTYPE_HYDRAULICS]=0;
PlayerInfo[playerid][sCARMODTYPE_FRONT_BUMPER]=0;
PlayerInfo[playerid][sCARMODTYPE_REAR_BUMPER]=0;
PlayerInfo[playerid][sCARMODTYPE_VENT_RIGHT]=0;
PlayerInfo[playerid][sCARMODTYPE_VENT_LEFT]=0;
Ohne die Funktioniert es aber der Nächste Spieler das die ID vergeben wird bekommt Probleme.
Hat es damit zusammen zu hängen das die Variable schon auf false ist?
Mit freundlichen Grüßen
Martinez