SurvivalGames [Remake]
#9
I haven't looked much at the code until now, it's really bad. The proper way to do it is to iterate over all broken blocks at once using a single SQL prepared statement and executing a function for each row returned. Have a look at GalExport's function SQLite:ExecuteStatement ( https://github.com/madmaxoft/GalExport/b...#L148-L175 ) and its usage in any of the other SQLite functions there, for example the SQLite:GetApprovedAreasInGroup() ( https://github.com/madmaxoft/GalExport/b...#L280-L308 )

If you don't want to have a separate function for executing the SQL statement, you can do it similarly as the Gallery plugin in its function SQLite:LoadPlayerAreasInGallery ( https://github.com/mc-server/Gallery/blo...#L291-L326 ).
Reply
Thanks given by:


Messages In This Thread
SurvivalGames [Remake] - by agusnat16 - 03-24-2014, 06:18 AM
RE: Remake: SurvivalGames - by xoft - 03-24-2014, 08:00 AM
RE: SurvivalGames [Remake] - by fankins - 03-24-2014, 10:43 PM
RE: SurvivalGames [Remake] - by pikachu784 - 03-27-2014, 10:11 AM
RE: SurvivalGames [Remake] - by agusnat16 - 03-27-2014, 11:06 AM
RE: SurvivalGames [Remake] - by ThuGie - 03-28-2014, 12:29 AM
RE: SurvivalGames [Remake] - by xoft - 03-28-2014, 12:58 AM
RE: SurvivalGames [Remake] - by ThuGie - 03-28-2014, 01:03 AM
RE: SurvivalGames [Remake] - by xoft - 03-28-2014, 03:30 AM
RE: SurvivalGames [Remake] - by pikachu784 - 04-16-2014, 03:51 PM
RE: SurvivalGames [Remake] - by xoft - 04-16-2014, 04:10 PM
RE: SurvivalGames [Remake] - by pikachu784 - 04-16-2014, 04:26 PM
RE: SurvivalGames [Remake] - by xoft - 04-16-2014, 04:54 PM
RE: SurvivalGames [Remake] - by pikachu784 - 04-16-2014, 05:16 PM
RE: SurvivalGames [Remake] - by daniel0916 - 04-16-2014, 05:25 PM
RE: SurvivalGames [Remake] - by pikachu784 - 04-16-2014, 05:37 PM
RE: SurvivalGames [Remake] - by pikachu784 - 04-17-2014, 07:30 AM



Users browsing this thread: 4 Guest(s)