17.12.2016, 14:43
Except the fact you posted 5+ irrelevant commands along with the function, you've been told the solution: http://forum.sa-mp.com/showpost.php?...2&postcount=31
I see you changed the part that the sql ID was used as index which is good but the other thing is still the same.
Instead of keep checking with an if statement, just change
to:
so if there are more rows than the size of the array, it will load only as many as it can. You may want to compare it and print in the console to let you know (to increase the size of the array) but nevermind for now. By the way, the logs are old as the current size is 600 but says 500.
Last, remove this completely:
Just be careful with the brackets.
I see you changed the part that the sql ID was used as index which is good but the other thing is still the same.
Instead of keep checking with an if statement, just change
pawn Код:
count = db_num_rows(qresult);
pawn Код:
count = clamp(db_num_rows(qresult), .max = sizeof oVehicle);
Last, remove this completely:
pawn Код:
if (count <= MAX_SCRIPT_VEHICLES)