TeamUlysses / ulib

ULib: A Lua library for more rapid development on Garry's Mod servers
http://ulyssesmod.net
Other
104 stars 55 forks source link

Error with registering warrant/wanted reason with darkrp vars #79

Closed Jayy-Smitty closed 2 years ago

Jayy-Smitty commented 3 years ago

Steps to reproduce

1.install dark rp ulx and ulib 2.become and officer

  1. create warrant/wanted reason

Expected behavior

Tell us what should happen: There should be no error not quite sure if this is actually ulib.. Any input would be helpful..

Actual behavior

Tell us what happens instead: It will create a error in game.

Error(s) in server console, if any

[ulib] Warning! A net message (DarkRP_PlayerVar) is already started! Discarding in favor of the new message! (DarkRP_simplerrError)

  1. sendErrors - gamemodes/policerp/gamemode/modules/base/sh_simplerr.lua:64
  2. fn - gamemodes/policerp/gamemode/modules/base/sh_simplerr.lua:73
  3. Call - addons/ulib/lua/ulib/shared/hook.lua:109
  4. errorNoHalt - gamemodes/policerp/gamemode/libraries/simplerr.lua:533
  5. warnRegistration - gamemodes/policerp/gamemode/modules/base/sh_entityvars.lua:37
  6. writeNetDarkRPVar - gamemodes/policerp/gamemode/modules/base/sh_entityvars.lua:46
  7. setDarkRPVar - gamemodes/policerp/gamemode/modules/base/sv_entityvars.lua:46
  8. fn - addons/advanced_police_mod/lua/vs_policemod/app/sv_citizens.lua:3
  9. Call - addons/ulib/lua/ulib/shared/hook.lua:109
  10. warrant - gamemodes/policerp/gamemode/modules/police/sv_init.lua:10
  11. callback - gamemodes/policerp/gamemode/modules/police/sv_init.lua:177

Error(s) in player's console, if any

[ERROR] A runtime error has occurred in "addons/ulib/lua/ulib/shared/hook.lua" on line 109. The best help I can give you is this:

Warning! DarkRPVar 'warrantReason' wasn't registered! Please contact the author of the DarkRP Addon to fix this. Until this is fixed you don't need to worry about anything. Everything will keep working. It's just that registering DarkRPVars would make DarkRP faster.

Hints:

The responsibility for the error above lies with (the authors of) one (or more) of these files:

  1. addons/ulib/lua/ulib/shared/hook.lua on line 109
  2. gamemodes/policerp/gamemode/modules/police/sv_init.lua on line 10
  3. gamemodes/policerp/gamemode/modules/police/sv_init.lua on line 177
  4. gamemodes/policerp/gamemode/modules/chat/sv_chat.lua on line 17
  5. gamemodes/policerp/gamemode/modules/chat/sv_chat.lua on line 325
  6. lua/includes/modules/concommand.lua on line 54 ------- End of Simplerr error -------

Version

Run "ulx version" in console and paste the result ULib v2.63 ULX v3.73d

ZenBre4ker commented 2 years ago

Are you sure that was the first error in console? Try to restart and see what happens, because I tried ULib.replicatedWritableCvar( sv_cvar, cl_cvar, default_value, save, notify, access ) with default_value as as value not a string. Before that made no problems, but since the .net update I get an error https://github.com/TeamUlysses/ulib/commit/09c4e751a1deaec6202c7c5c23a8b11205720956#diff-dbb40aa172e92e98991fa2750b461bafed33dcc0bbe765cc2b40b32f159daa5cL196-R133

[ulib-master] addons/ulib-master/lua/ulib/server/util.lua:131: bad argument #1 to 'WriteString' (string expected, got boolean)
  1. WriteString - [C]:-1
   2. replicatedWritableCvar - addons/ulib-master/lua/ulib/server/util.lua:131
    3. AutoReplicateConVar - lua/ulx/xgui/server/sv_terrortown.lua:21
     4. init - lua/ulx/xgui/server/sv_terrortown.lua:145
      5. fn - addons/ulx-master/lua/ulx/modules/xgui_server.lua:314
       6. unknown - addons/ulib-master/lua/ulib/shared/hook.lua:109
zpetty33 commented 2 years ago

This issue was fixed in https://github.com/TeamUlysses/ulib/pull/82