FredyH / MySQLOO

MySQLOO
GNU Lesser General Public License v2.1
140 stars 55 forks source link

Issue with server #119

Closed rbreslin18 closed 1 year ago

rbreslin18 commented 1 year ago

Loading mysqloo module... done!
[ERROR] gamemodes/perp/gamemode/sv_hooks.lua:4: attempt to call field 'Query' (a nil value)
  1. sendOnline - gamemodes/perp/gamemode/sv_hooks.lua:4
   2. unknown - gamemodes/perp/gamemode/sv_hooks.lua:69

Any reason why this may be happening? I'm currently on the journey of fixing the an old perp gamemode(way more annoying than I thought lol) and was in the process of trying to get the DB to work properly and keep running into this error. Help would be great thanks.
FredyH commented 1 year ago

MySQLOO does not have a field db.Query, so this is why it is giving you the error. The correct code should be db:query(sql).

rbreslin18 commented 1 year ago

thanks for quick response, im going to try and get tmysql working properly instead of rewriting everything since im lazy

FredyH commented 1 year ago

You can also try to use the tmysql drop in replacement to emulate tmysql using mysqloo. It is located in the lua subfolder of this project, but I cannot guarantee it still works properly.

rbreslin18 commented 1 year ago

Ill give it a go, i found the old tmysql3 online and it seems to work with this old legacy perp code.