BadgerCode / tttdamagelogs

Damagelogs and RDM Manager for Trouble in Terrorist Town (a Garry's Mod gamemode)
GNU General Public License v3.0
19 stars 23 forks source link

SQLite error #16

Closed ihatemagic closed 3 years ago

ihatemagic commented 3 years ago

I have noticed that this particular error occurs numerous times per map. Although the directory is different, the lua files are the same except for the lua includes. It says there's an issue with autoslay line 47, but I can't figure out if this is a damagelog problem or maybe problem on my side.

[flux] addons/flux/lua/flux/modules/damagelogs/damagelogs/server/sqlite.lua:10: Error performing query UPDATE damagelog_nam...: [SQL Error] near "LIMIT": syntax error

  1. assert - [C]:-1
    1. Query - addons/flux/lua/flux/modules/damagelogs/damagelogs/server/sqlite.lua:10
    2. fn - addons/flux/lua/flux/modules/damagelogs/damagelogs/server/autoslay.lua:47
      1. unknown - addons/flux/lua/ulib/shared/hook.lua:109
      2. UniqueID - [C]:-1
      3. echoToAdmins - addons/flux/lua/ulx/log.lua:164
      4. fn - addons/flux/lua/ulx/log.lua:202
        1. unknown - addons/flux/lua/ulib/shared/hook.lua:109
BadgerCode commented 3 years ago

Hey. Was it a bot being slain?

If not, it might be to do with the player having strange letters in their name. Could you share the name of the player or other players that were online at the time?

It seems this is the affected line https://github.com/BadgerCode/tttdamagelogs/blob/4a0ca3f9fed53603556760ab59ef45f7be4a135a/lua/damagelogs/server/autoslay.lua#L47

BadgerCode commented 3 years ago

I believe that using LIMIT with an UPDATE query is not supported (at least some of the time) in Garry's Mod.

I've removed the usage of LIMIT as it's not really necessary anyway.

This will be shipped with the next version

BadgerCode commented 3 years ago

This will be fixed in the next update (most likely v3.4.0). There is still some more work to go into this update.

You can download the early version of this update from the next-version branch here