gmodWare / gware-utilities

gmodWare roleplay utilities
2 stars 1 forks source link

gWare.Utils.JobAccess not initialized on server #9

Closed MenschlichTv closed 1 year ago

MenschlichTv commented 1 year ago

If there are no jobs added in job_multi_select settings it will throw an error when accessing the permission check. This happens becasue gWare.Utils.JobAccess[settingID] is not initialized on the server if the table is empty.

[gware-utils] addons/gware-utils/lua/gware-utils/settings/sh_settings.lua:23: attempt to index a nil value
  1. HasJobAccess - addons/gware-utils/lua/gware-utils/settings/sh_settings.lua:23
   2. f - addons/gware-utils/lua/gware-utils/commands/sh_decode.lua:16
    3. callHooks - gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua:153
     4. callPlayerSayHooks - gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua:173
      5. unknown - gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua:244
Icarussakka commented 1 year ago

fixed it in the newest commit