- 0
Accessing element at index 501 past array upper bound 499
-
Similar Content
-
- 1 reply
- 2.001 views
-
marime array
By MihaiGG,
- 1 answer
- 589 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
By MihaiGG,
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
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
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now