Nak2 / StormFox

StormFox for garrysmod
Apache License 2.0
29 stars 13 forks source link

LUA-Error #23

Open Megamezzomixer opened 4 years ago

Megamezzomixer commented 4 years ago

I've recently discovered a LUA-Error coming from SF.

[StormFox - Environment mod] lua/stormfox/lib/sh_permissions.lua:79: attempt to call method 'IsListenServerHost' (a nil value)

1. SettingsEdit - lua/stormfox/lib/sh_permissions.lua:79

2. unknown - lua/stormfox/sh_options.lua:4

3. unknown - lua/includes/modules/concommand.lua:54
SupinePandora43 commented 4 years ago

error is caused by calling function what doesn't exists. usually they throwed because method called on wrong side (IsListenServerHost is Client-side, cause error on Server-side), or old gmod version, wrong method name

Megamezzomixer commented 4 years ago

Yes, I know, but this bug is in the current workshop build and may need to be fixed.

Kefta commented 4 years ago

It is indeed caused by IsListenServerHost being used clientside. I believe the listen server host will always have UserID 0 so you can use that as a shared check instead. Otherwise, you'll have to network the player's host state on startup.