Aperture-Development / MSync-2

Version 2 of MSync - Fully working and extra steak
https://www.Aperture-Development.de
GNU General Public License v3.0
12 stars 1 forks source link

enabledModules error after installation #54

Closed XeroxDev closed 4 years ago

XeroxDev commented 4 years ago

Description After I installed every dependency and your addon, I started the server, joined, executed !msync and then it threw errors

I tried Workshop installation and git installation

Reproduction Just installed and executed !msync

Error Messages

Server-Error:
Lua Error: [ERROR] addons/msync2/lua/msync/server/sv_init.lua:91: attempt to index field 'enabledModules' (a nil value) 1. getModuleInfos - addons/msync2/lua/msync/server/sv_init.lua:91 2. func - addons/msync2/lua/msync/server/sv_net.lua:121 3. unknown - lua/includes/extensions/net.lua:32

Client-Error:
[msync2] addons/msync2/lua/msync/client_gui/cl_admin_gui.lua:230: attempt to index field 'moduleState' (a nil value)
  1. InitModuleSettings - addons/msync2/lua/msync/client_gui/cl_admin_gui.lua:230
   2. InitPanel - addons/msync2/lua/msync/client_gui/cl_admin_gui.lua:262
    3. func - addons/msync2/lua/msync/client_gui/cl_net.lua:89
     4. unknown - lua/includes/extensions/net.lua:32
ApertureDevelopment commented 4 years ago

Hello, I need a few more informations as I am unable to reproduce that behaviour

Do you have any error messages prior to this one? ( In the server console ) Did you maybe install a addon that changes default GLua behaviour ( e.g. DLib ) ? Can you verify the correct installation of MySQLoo using lua_run require('mysqloo'); print(mysqloo.VERSION) ? Can you verify the existance of data/msync/settings.lua ? Did you upgrade from MSync 1 to MSync 2 ?

XeroxDev commented 4 years ago

Hello, I need a few more informations as I am unable to reproduce that behaviour

No problem. I try my best to give you all necessary information you need.

Do you have any error messages prior to this one? ( In the server console )

Yes. There are these error messages:

18:54:10

06/27/2020 - 18:54:10: Lua Error: addons/msync2/lua/msync/server/sv_modules.lua:27: attempt to index field 'enabledModules' (a nil value) stack traceback: [C]: in function '__index' addons/msync2/lua/msync/server/sv_modules.lua:27: in function 'initModules' addons/msync2/lua/msync/server/sv_mysql.lua:79: in function <addons/msync2/lua/msync/server/sv_mysql.lua:77> [C]: in function 'fn' lua/ulib/shared/hook.lua:109: in function <lua/ulib/shared/hook.lua:92>

18:54:19

06/27/2020 - 18:54:19: Lua Error: [ULib] lua/includes/extensions/net.lua:103: bad argument #1 to 'pairs' (table expected, got nil) 1. pairs - [C]:-1 2. WriteTable - lua/includes/extensions/net.lua:103 3. sendTable - addons/msync2/lua/msync/server/sv_net.lua:17 4. fn - addons/msync2/lua/msync/server/sv_hooks.lua:30 5. unknown - lua/ulib/shared/hook.lua:109
06/27/2020 - 18:54:19: Lua Error: [ERROR] Warning! A net message (msync.sendTable) is already started! Discarding in favor of the new message! (TTT_Equipment) 1. SendEquipment - gamemodes/terrortown/gamemode/player_ext.lua:84 2. ResetEquipment - gamemodes/terrortown/gamemode/player_ext.lua:91 3. ResetRoundFlags - gamemodes/terrortown/gamemode/player_ext.lua:146 4. unknown - gamemodes/terrortown/gamemode/player.lua:64

Did you maybe install a addon that changes default GLua behaviour ( e.g. DLib ) ?

Everything I installed is in this collection: https://steamcommunity.com/sharedfiles/filedetails/?id=2139390199 3 things I've installed on the server. The first one is easy-scoreboard, tttdamagelogs and your addon

Can you verify the correct installation of MySQLoo using lua_run require('mysqloo'); print(mysqloo.VERSION) ?

Sadly in this context it says "Unknown command 'print'" but I think it's correctly installed, cause tttdamagelogs and msync2 can connect to the database / created the database tables.

Can you verify the existance of data/msync/settings.lua ?

There is no settings.lua but a settings.txt

Did you upgrade from MSync 1 to MSync 2 ?

I first tried v1 but found your comment of v2. Removed v1 and installed v2

ApertureDevelopment commented 4 years ago

Okay, so your issue is that you installed MSync 1 previously, they use the same settings.txt but the structure changed from V1 to V2. Because of that MSync thinks you already have the settings and attempts to load them, but because of the different structure it isnt able to check whioch modules are enabled and wich aint. So to fix your problem, remove the settings.txt from the data/msync folder and restart your server/change the map. Now a new file should be created and you should be able to setup MSync 2

XeroxDev commented 4 years ago

Thank you for your really fast help! This was the problem. Thank you :)

But before you close this issue I have a small question. Does msync2 only sync the bans created via mban or does it work also with ulx bans?

ApertureDevelopment commented 4 years ago

As of now yes. But I just saw that the ULX team added a hook to listen to for ban events, so that feature will propably be implemented very soon.

XeroxDev commented 4 years ago

Oh. Okay. Hopefully you get this implemented fast :D Or people get confused why there are 20 different ban commands :D

And what about permissions? Did you implemented the commands to ulx for permission management? Cause I find only permissions for the database settings.

ApertureDevelopment commented 4 years ago

The commands should be avaiable as soon as the module is started. It may be necessary to reload the map after enabling a module

XeroxDev commented 4 years ago

The commands are available, yes. But I can't set group-permissions to these commands.

ApertureDevelopment commented 4 years ago

Again, it may be necessary to reload the map for ULX to recognize the changes. Permissions should be for example msync.mbsync.banPlayer

XeroxDev commented 4 years ago

Okay. Yes. After a restart it worked. Thank you :)

ApertureDevelopment commented 4 years ago

btw I saw you speak German. Du kannst auch bei uns auf dem TeamSpeak server für persönlichen support vorbeischeuen unter ts3.Aperture-Development.de oder auf discord https://discordapp.com/invite/JpDPa6w

XeroxDev commented 4 years ago

Ja. Habe auch gesehen, dass ihr Deutsch spricht. Jedoch fand ich, dass es besser wäre, so ein Ticket auf Englisch zu schreiben, falls mal jemand anderes auch so ein Problem hat, damit er dann auch versteht, was wir geschrieben haben :D