- 0
Eroare in consola Task DecreaseTimer SA-MP SERVER
-
Similar Content
-
- 3 replies
- 577 views
-
- 1 answer
- 516 views
-
- 0 replies
- 160 views
-
- 3 replies
- 459 views
-
- 2 replies
- 212 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
mrrares19
[debug] Run time error 4: "Array index out of bounds"
[debug] Attempted to read/write array element at index 101 in array of size 101
[debug] AMX backtrace:
[debug] #0 00344398 in public DecreaseTimer () at mrx.pwn:30372
30372: foreach(PersonalVSpawned, idd) if(CarInfo[idd][cTime] < gettime() && CarInfo[idd][cTime] != -1) DestroyPlayerCar(idd);
stock-ul in caz ca e nevoie:
stock DestroyPlayerCar(dbid) {
if(CarInfo[dbid][Spawned] == 0) return true;
VehicleOwned[CarInfo[dbid][Spawned]] = 0;
VehicleSQL[CarInfo[dbid][Spawned]] = 0;
CarInfo[dbid][cTime] = -1;
new Float: Pos[3];
GetVehiclePos(CarInfo[dbid][Spawned], Pos[0], Pos[1], Pos[2]);
if(strlen(CarInfo[dbid][cText]) >= 3) DestroyDynamicObject(nameobject[CarInfo[dbid][Spawned]]);
if(CarInfo[dbid][cNeon]) {
DestroyDynamicObject(NeonObj[0][CarInfo[dbid][Spawned]]);
DestroyDynamicObject(NeonObj[1][CarInfo[dbid][Spawned]]);
}
Iter_Remove(PersonalVSpawned, dbid);
MyVehicleSpawn[CarInfo[dbid][cOnline]] --;
CarInfo[dbid][cFuel] = Gas[CarInfo[dbid][Spawned]];
mysql_format(SQL, gQuery, sizeof(gQuery), "UPDATE `cars` SET `Fuel`='%d' WHERE `ID`='%d'", CarInfo[dbid][cFuel], CarInfo[dbid][cID]);
mysql_tquery(SQL, gQuery, "", "");
CarInfo[dbid][cLastPos][0] = Pos[0];
CarInfo[dbid][cLastPos][1] = Pos[1];
CarInfo[dbid][cLastPos][2] = Pos[2];
DestroyVehicle(CarInfo[dbid][Spawned]);
CarInfo[dbid][Spawned] = 0;
return true;
}
Va rog ajutati-ma ,nu scap de eroarea asta de 1 luna !
6 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.