ValentinFunk / LibK

Library for fast gmod addon development
MIT License
51 stars 21 forks source link

Added working mysqloo 9.7.+ support #40

Closed FredyH closed 2 years ago

FredyH commented 2 years ago

My last PR (#39) did unfortunately not work with myslqoo 9.7 because mysqloo is required after the mysqloolib is loaded, which causes the metatables to not exist at the point the script is loaded. This PR fixes this issue by lazy loading the metatables to where they are only attempted to be loaded after mysqloo was already required. I tested this using mysqloo 9.6, 9.7 and without any mysqloo, and everything works as expected now.

I also fixed a hook name missing in sv_libk_database.lua which threw an error when I tried to load libk (maybe it worked for you because you are using a modified hook library?). Please check if this is correct though.

ValentinFunk commented 2 years ago

Great, thanks for the work you're putting into this! I think the hook name must be a bug, thanks for fixing that.