Problem with loading houses
#2

That's because you loop 500 times.

Execute only 1 query:
pawn Код:
"SELECT * FROM "Houses_Table""
and then loop as many times as the rows are. Use an if statement inside the loop that checks if the i is equal to the size of HouseInfo array and use break; to stop the loop so it won't go out of bounds in case there are more houses in the database than you've declared to the array.

PS: The index should start from 0 and not from 1.
PS2: Updating the mysql plugin to R38 and using threaded queries which are faster and better is recommended.
Reply


Messages In This Thread
Problem with loading houses - by biker122 - 14.05.2014, 10:15
Re: Problem with loading houses - by Konstantinos - 14.05.2014, 10:25
Re: Problem with loading houses - by biker122 - 14.05.2014, 10:42

Forum Jump:


Users browsing this thread: 1 Guest(s)