Guthen / guthlevelsystem

Garry's Mod Level System
Apache License 2.0
12 stars 0 forks source link

Not working #12

Closed pkmnmstr98 closed 2 years ago

pkmnmstr98 commented 2 years ago

Doesnt seem to create the tables for the DB on TTT

Guthen commented 2 years ago

Do you have any further information? Like does it works on an different gamemode (ex: Sandbox)? Does it throw an error into the (server) console? Is it only affecting the save & load system?

pkmnmstr98 commented 2 years ago

These are errors with a vanilla sandbox server:

[ Info ] guthlevelsystem: "guthlevelsystem/sh_config.lua" loaded [ Info ] guthlevelsystem: "guthlevelsystem/sh_commands.lua" loaded [ Info ] guthlevelsystem: "guthlevelsystem/sh_players.lua" loaded

[levelsystem] addons/levelsystem/lua/guthlevelsystem/cl_hud.lua:10: attempt to call field 'load_hud' (a nil value)

  1. unknown - addons/levelsystem/lua/guthlevelsystem/cl_hud.lua:10
    1. include - [C]:-1
    2. load_file - addons/levelsystem/lua/autorun/guthlevelsystem.lua:64
      1. unknown - addons/levelsystem/lua/autorun/guthlevelsystem.lua:250

[ Info ] guthlevelsystem: "guthlevelsystem/cl_hud.lua" loaded [ Info ] guthlevelsystem: "guthlevelsystem/cl_panel.lua" loaded [ Info ] guthlevelsystem: v2.3.0 loaded; type 'guthlevelsystem_about' for more informations on this addon.

pkmnmstr98 commented 2 years ago

These are some extra errors i got while on TTT ----->

[ Info ] guthlevelsystem: data has been created on "PNAME" (STEAM_0:1:000000) [ Error ] guthlevelsystem: failed to get data of "STEAM_0:1:000000" : success

Guthen commented 2 years ago

Thanks I will look into that

pkmnmstr98 commented 2 years ago

I tried using mysql on vanilla sandbox and i got even more errors :(

L 09/18/2022 - 17:46:51: Lua Error: addons/levelsystem/lua/guthlevelsystem/sv_data.lua:82: attempt to index a nil value stack traceback: [C]: in function 'index' addons/levelsystem/lua/guthlevelsystem/sv_data.lua:82: in function 'callback' addons/sqllib/lua/gsql/modules/mysqloo.lua:74: in function <addons/sqllib/lua/gsql/modules/mysqloo.lua:72> [C]: in function 'v' lua/includes/modules/hook.lua:96: in function <lua/includes/modules/hook.lua:79> addons/levelsystem/lua/guthlevelsystem/sv_data.lua:82: attempt to index a nil value stack traceback: [C]: in function 'index' addons/levelsystem/lua/guthlevelsystem/sv_data.lua:82: in function 'callback' addons/sqllib/lua/gsql/modules/mysqloo.lua:74: in function <addons/sqllib/lua/gsql/modules/mysqloo.lua:72> [C]: in function 'v'

It was only able to create one table: guthlevelsystem_version

pkmnmstr98 commented 2 years ago

I created the mysql tables manually and now its actually storing data. I dont see anywhere in your code where you create the table that holds player data. Also looks like you're missing a function "load_hud"

Guthen commented 2 years ago

I just fixed the HUD issue, I have messed up with the latest update I made.

I'm looking for the database issue, if you want to know, the players table is created using the lua/guthlevelsystem/migrations/*.sql files

Guthen commented 2 years ago

This should be fixed! Had to install a MySQL dev-server on my machine to replicate & fix the issue

I guess you will keep your tables as they are, but let me know at least how it goes for the HUD (and any other issues)

Guthen commented 2 years ago

Also fixed an issue with the migration system when using MySQLOO (https://github.com/Guthen/guthlevelsystem/commit/b09ec04d679b0bc569c792a47261d26f729312d0) :p

pkmnmstr98 commented 2 years ago

L 09/19/2022 - 08:00:10: Lua Error: addons/levelsystem/lua/guthlevelsystem/sv_data.lua:82: attempt to index a nil value stack traceback: [C]: in function 'index' addons/levelsystem/lua/guthlevelsystem/sv_data.lua:82: in function 'callback' addons/sqllib/lua/gsql/modules/mysqloo.lua:74: in function <addons/sqllib/lua/gsql/modules/mysqloo.lua:72> [C]: in function 'fn' addons/ulib/lua/ulib/shared/hook.lua:109: in function <addons/ulib/lua/ulib/shared/hook.lua:92> addons/levelsystem/lua/guthlevelsystem/sv_data.lua:82: attempt to index a nil value stack traceback: [C]: in function 'index' addons/levelsystem/lua/guthlevelsystem/sv_data.lua:82: in function 'callback' addons/sqllib/lua/gsql/modules/mysqloo.lua:74: in function <addons/sqllib/lua/gsql/modules/mysqloo.lua:72> [C]: in function 'fn' addons/ulib/lua/ulib/shared/hook.lua:109: in function <addons/ulib/lua/ulib/shared/hook.lua:92>Writing cfg/banned_user.cfg.

ULX might be causing issues with your addon since it needs its own hooks

Guthen commented 2 years ago

hmm, you updated the entire addon with the changes I have made, right?

pkmnmstr98 commented 2 years ago

I just saw you released more updates haha

Guthen commented 2 years ago

Ah yes :p Did they fix all problems?

pkmnmstr98 commented 2 years ago

Yes!