- 0
Accessing element at index 501 past array upper bound 499
-
Similar Content
-
- 11 replies
- 1,594 views
-
- 1 reply
- 1,640 views
-
Index samp
By zXk.,
- 8 replies
- 1,067 views
-
marime array
By MihaiGG,
- 1 answer
- 340 views
-
- 165 replies
- 36,216 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
NERS
Salut, am incercat sa fac un sistem de vehicule personale si am intampinat aceasta eroare in consola cand dau /q, are cineva idee de ce?
[debug] Run time error 4: "Array index out of bounds"
[debug] Accessing element at index 501 past array upper bound 499
[debug] AMX backtrace:
[debug] #0 0007ae44 in public ppb_OnPlayerDisconnect (playerid=0, reason=1) at gm.pwn:4954
[debug] #1 00024de8 in ?? (... <2 arguments>) at C:\GTA San Andreas\Gamemode\pawno\include\playerprogress.inc:135
[debug] #2 0001b410 in public SSCANF_OnPlayerDisconnect (playerid=0, reason=1) at C:\GTA San Andreas\Gamemode\pawno\include\YSI\y_hooks/impl.inc:682
[debug] #3 00003968 in public Itter_OnPlayerDisconnect (playerid=0, reason=1) at C:\GTA San Andreas\Gamemode\pawno\include\sscanf2.inc:260
[debug] #4 000028f0 in public OnPlayerDisconnect (playerid=0, reason=1) at C:\GTA San Andreas\Gamemode\pawno\include\YSI\y_iterate.inc:909
[part] NERS has left the server (0:1)
Iteratorii arata asa:
#undef MAX_PLAYERS
#define MAX_PLAYERS 50
#define MAX_PLAYER_PERSONAL_VEHICLES 10
#define MAX_PLAYERS_PERSONAL_VEHICLES MAX_PLAYERS * MAX_PLAYER_PERSONAL_VEHICLES
Iterator: TotalPersonalVehicles<MAX_PLAYERS_PERSONAL_VEHICLES>,
IteratorArray: PersonalVehicles[MAX_PLAYERS]<MAX_PLAYERS_PERSONAL_VEHICLES>,
Loop-ul cu probleme:
foreach(i : PersonalVehicles[playerid]) {
for(new c; c < 17; c++) CarInfo[i][cComponents][c] = 0; //asta este linia unde primesc eroare
if(CarInfo[i][cSpawned] != INVALID_VEHICLE_ID) DestroyVehicleEx(CarInfo[i][cSpawned]);
CarInfo[i][cUserid] = INVALID_PLAYER_ID;
CarInfo[i][cSpawned] = INVALID_VEHICLE_ID;
CarInfo[i][cDespawnTime] = 0;
CarInfo[i][cOwner] = (EOS);
CarInfo[i][cPlate] = (EOS);
CarInfo[i][cID] = 0;
CarInfo[i][cModel] = 0;
CarInfo[i][cFuel] = 0;
CarInfo[i][cAge] = 0;
CarInfo[i][cColorOne] = 0;
CarInfo[i][cColorTwo] = 0;
CarInfo[i][cInsurance] = 0;
CarInfo[i][cPaintjob] = 0;
CarInfo[i][cVirtualWorld] = 0;
CarInfo[i][cInterior] = 0;
CarInfo[i][cLocationx] = 0;
CarInfo[i][cLocationy] = 0;
CarInfo[i][cLocationz] = 0;
CarInfo[i][cAngle] = 0;
CarInfo[i][cKM] = 0;
CarInfo[i][cLock] = false;
Iter_SafeRemove(TotalPersonalVehicles, i, i);
Edited by NERSIter_SafeRemove(PersonalVehicles[playerid], i, i);
}
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.