04.06.2013, 02:11
To avoid OOB in this case, you can do this;
Assuming that is vehicleInformation[MAX_VEHICLES]....
If you are using auto increment in tables and its not giving right ID, you should;
ALTER TABLE `MyTable` AUTO_INCREMENT = 1, it will reset it.
Assuming that is vehicleInformation[MAX_VEHICLES]....
pawn Код:
if(vid > MAX_VEHICLES) return SendClientMessage(playerid, -1, "[WARNING!] mysql_insert_id returned a value higher then MAX_VEHICLES.");
ALTER TABLE `MyTable` AUTO_INCREMENT = 1, it will reset it.