TTT-2 / TTT2

Trouble in Terrorist Town 2 for Garry's Mod (gmod)
https://steamcommunity.com/sharedfiles/filedetails/?id=1357204556
179 stars 77 forks source link

Error with sh_sql.lua #322

Closed derekstephen closed 5 years ago

derekstephen commented 5 years ago

Describe the bug Just installed a clean version of TTT2 from the steam workshop for the server. The moment I am joining the server, I get this error in console:

[ERROR] addons/ttt2/gamemodes/terrortown/gamemode/shared/sh_sql.lua:220: attempt to call field 'IsEmpty' (a nil value)
  1. Load - addons/ttt2/gamemodes/terrortown/gamemode/shared/sh_sql.lua:220
   2. LoadData - addons/ttt2/gamemodes/terrortown/gamemode/shared/huds/base_huds/hud_base/cl_init.lua:263
    3. LoadData - addons/ttt2/gamemodes/terrortown/gamemode/shared/huds/base_huds/scalable_hud/cl_init.lua:40
     4. UpdateHUD - addons/ttt2/gamemodes/terrortown/gamemode/client/cl_hud_manager.lua:160
      5. func - addons/ttt2/gamemodes/terrortown/gamemode/client/cl_hud_manager.lua:193
       6. unknown - lua/includes/extensions/net.lua:32

If I try to do stuff like change my HUD, I get this error:

[ERROR] addons/ttt2/gamemodes/terrortown/gamemode/shared/sh_sql.lua:210: attempt to call field 'IsEmpty' (a nil value)
  1. Save - addons/ttt2/gamemodes/terrortown/gamemode/shared/sh_sql.lua:210
   2. SaveData - addons/ttt2/gamemodes/terrortown/gamemode/shared/huds/base_huds/hud_base/cl_init.lua:243
    3. UpdateHUD - addons/ttt2/gamemodes/terrortown/gamemode/client/cl_hud_manager.lua:151
     4. func - addons/ttt2/gamemodes/terrortown/gamemode/client/cl_hud_manager.lua:193
      5. unknown - lua/includes/extensions/net.lua:32

[ERROR] addons/ttt2/gamemodes/terrortown/gamemode/shared/sh_sql.lua:210: attempt to call field 'IsEmpty' (a nil value)
  1. Save - addons/ttt2/gamemodes/terrortown/gamemode/shared/sh_sql.lua:210
   2. SaveData - addons/ttt2/gamemodes/terrortown/gamemode/shared/huds/base_huds/hud_base/cl_init.lua:243
    3. unknown - addons/ttt2/gamemodes/terrortown/gamemode/client/vgui/cl_hudswitcher.lua:175

It is most likely an error on my half, so any ideas what I might need to do or where to look would help.

To Reproduce Sorry I am not sure how to reproduce this minus just trying to change your hud.

Desktop (please complete the following information):

derekstephen commented 5 years ago

Nevermind, figured out why.

For those checking, it was because the server wasn't on the beta branch of gmod. (whoops haha)

Alf21 commented 5 years ago

Oh okay. I know that this feature is currently just supported by the dev branch of gmod, BUT i pushed an updates that temporarily implements this function to avoid issues like this. So you should be able to use the stable branch as long as this add-on is up-to-date. :)