CynCeyd / TS3BridgeTTT

A simple bridge between TeamSpeak 3 and GMod TTT
GNU General Public License v3.0
6 stars 6 forks source link

attempt to call global 'ServerLog' (a nil value) #12

Open DerMarten opened 2 years ago

DerMarten commented 2 years ago

After some playing time, this error occurs by chance. And the script crashes

lua/autorun/ts3bridge.lua:135: attempt to call global 'ServerLog' (a nil value)
    1. log - lua/autorun/ts3bridge.lua:135
        2. unknown - lua/autorun/ts3bridge.lua:448
CynCeyd commented 2 years ago

Sorry for taking so long, I'm pretty busy currently unfortunately.

May I ask what your server setup looks like? Are you using a dedicated server, hosting locally etc.? It seems to me like the ServerLog command cannot be found. I haven't heard or read that the developers removed this command, so I think it may be an issue with the setup (like: You're hosting locally within GMod and for some reason the ServerLog command would not be available).

What you could try is modifying line 135in the ts3bridge.lua from ServerLog("[TS3 Bridge TTT] " .. message .. "\r\n") to -- ServerLog("[TS3 Bridge TTT] " .. message .. "\r\n").

The problematic command would not be executed any further and you could further evaluate if any more errors are occuring.

DerMarten commented 2 years ago

I commented out line 448 --log ("Loading TeamSpeak 3 bridge"). Because the log function of the script itself works. The error also only occurs randomly. I hosted the server at Nitrado, apparently Nitrado has the game server in a Docker container. The server console always says Try to connect to container ... in the web interface.