Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A couple of issues. #27

Open
inthenightsky opened this issue May 8, 2019 · 7 comments
Open

A couple of issues. #27

inthenightsky opened this issue May 8, 2019 · 7 comments

Comments

@inthenightsky
Copy link

inthenightsky commented May 8, 2019

I have the latest version of LibK, downloaded from GitHub.
I have the latest version of Pointshop2, downloaded from GmodStore.
I have the latest version of PAC3, downloaded from GitHub as well.

I've configured my database settings in libk/lua/libk/server/sv_libk_config.lua, and they're valid.

I'm using the mysqloo module if it makes any difference.

Client "Night" connected (xx.xx.xx.xx:xx).
Odd Error in DB, invalid database LibK
[ERROR] addons/libk/lua/libk/server/sv_libk_model.lua:20: attempt to index a nil value

  1. prepareForSQL - addons/libk/lua/libk/server/sv_libk_model.lua:20
  2. findAllDbByField - addons/libk/lua/libk/server/sv_libk_model.lua:241
  3. findByPlayer - addons/libk/lua/libk/server/sv_libk_model.lua:554
  4. fn - addons/libk/lua/libk/server/sv_libk_player.lua:3
  5. unknown - addons/ulib/lua/ulib/shared/hook.lua:109
    GLib.Resources : Compressing resource LuaPack/GLib took 197.06 ms (827.73 KiB to 110.94 KiB).
    WARNIG: uncaught error in Promise: Disconnected
    1: (_ = GLib.PlayerMonitor, ply = Entity (1) --[[ x, Night ]], userId = "x") [addons/pointshop2/lua/ps2/server/sv_pointshopcontroller_shop.lua: 18]
    2: xpcall (GLib.Error) [[C]: -1]
    3: DispatchEvent (self = { GLib.EventProvider: 0xf164af18 }, eventName = "PlayerDisconnected", GLib.PlayerMonitor, Entity (1) --[[ x, Night ]], "x") [addons/libk/lua/libk/3rdparty/glib/events/eventprovider.lua: 86]
    4: fn (data = { table: 0xea51ae38 }) [addons/libk/lua/libk/3rdparty/glib/garrysmod/servers/playermonitor.lua: 60]
    5: (name = "player_disconnect", gm = _R._LOADED.team:GAMEMODE, { table: 0xea51ae38 }) [addons/ulib/lua/ulib/shared/hook.lua: 109]
    Dropped Night from server (Disconnect by user.)

If you need further information feel free to ask, very confused on what I need to do to fix it.

@inthenightsky
Copy link
Author

If I install the folder as LibK-master, it'll throw this to the client console (notably nothing serverside):

[ERROR] addons/pointshop2/lua/autorun/pointshop2_init.lua:21: attempt to index global 'LibK' (a nil value)

  1. unknown - addons/pointshop2/lua/autorun/pointshop2_init.lua:21

[ERROR] addons/pointshop2/lua/autorun/ps2_kinv_init.lua:1: attempt to index global 'LibK' (a nil value)

  1. unknown - addons/pointshop2/lua/autorun/ps2_kinv_init.lua:1

Renaming the folder to libk will throw this to the server, but nothing clientside and the gamemode will seem to break:

Odd Error in DB, invalid database LibK
[ERROR] addons/libk/lua/libk/server/sv_libk_model.lua:20: attempt to index a nil value

  1. prepareForSQL - addons/libk/lua/libk/server/sv_libk_model.lua:20
  2. findAllDbByField - addons/libk/lua/libk/server/sv_libk_model.lua:241
  3. findByPlayer - addons/libk/lua/libk/server/sv_libk_model.lua:554
  4. fn - addons/libk/lua/libk/server/sv_libk_player.lua:3
  5. unknown - addons/ulib/lua/ulib/shared/hook.lua:109

@professormoretzsohn
Copy link

I'm getting the same error. Any fix?

@takaqiao
Copy link

takaqiao commented Jul 5, 2019

I was amazed. I thought this project was down cuz the author passed away
but seems like the author r still updating ? I dont understand wat happened..

@takaqiao
Copy link

takaqiao commented Jul 5, 2019

Oh btw after I tried used old libk and found out I cant install default items
I tried new one with a new clean mysql db and didnt found the errors u guys said
so I guess maybe u guys r not using mysql or not using the clean db :)

@ValentinFunk
Copy link
Owner

ValentinFunk commented Jul 5, 2019

Would love to help here but the init code was written 5 years ago and I have no idea what this could be. Unfortunately I haven't been able to work on gmod at all for quite some time now. Will happily accept MRs

@takaqiao
Copy link

Would love to help here but the init code was written 5 years ago and I have no idea what this could be. Unfortunately I haven't been able to work on gmod at all for quite some time now. Will happily accept MRs

Good job. It still work fine in my server :D

@ValentinFunk
Copy link
Owner

ValentinFunk commented Jul 17, 2019

For people coming here through google or something, a few things to try if you run into this issues like this:

  1. Turn on LibK Debug and check your logs (especially early logs) for ANY lua errors (even unrelated addons) since in Gmod if there is an error in one init function no others are run. If there is code that errors before LibK is fully initialized, there is a chance that it kills it
  2. Try removing a really large (in terms of number of lua files) addon from your server. Sounds stupid but sometimes issues are caused because GMOD refuses to load random lua files if you have too many.
  3. Reupload everything related to LibK and PS2. If you use FileZilla check the failed transfers tab (it's hard to miss and this has been an issue lots of times). If you're upgrading fully remove the folders before uploading again.
  4. Check and recheck your database settings. This is not usually going to be the problem (LibK will check for correct setup and should provide much more user friendly errors)
  5. Make sure to rename all folders in your addons folder to lowercase (yes, really)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants