I seem to be having quite a bit of trouble with my STool, it works fine in singleplayer, but when I transfer it to a listen server, everything just… Doesn’t work. I have a log of me utilizing the tool in singleplayer, and another one in multiplayer.
As you can see, this one shows the same as the above but from the point of view of a player in my listen server. Is it just me being stupid and GMod only runs one lua state for a listen server?
Here is my source:
TOOL.Category = "Construction"
TOOL.Name = "#ThreE_Cmd"
TOOL.Command = nil
TOOL.ConfigName = ""
if ( CLIENT ) then
language.Add( 'ThreE_Cmd', 'ThreE Command Tool' )
language.Add( 'Tool_Three_cmd_name', 'ThreE Command Tool' )
language.Add( 'Tool_Three_cmd_desc', '' )
language.Add( 'Tool_Three_cmd_0', '' )
function TOOL:LeftClick( trace )
print("Client was false.")
print("Server failure, client was true.")
--return ThreE.Selection(self:GetOwner(), trace)
It seems that ClientSide does not get called on a singleplayer game, and Serverside does not get called when I use the tool on a listen server, but BOTH get called, clientside on the client and serverside on the server, when another user calls the tool.
[editline]9th January 2011[/editline]
This is ridiculous, I copied the weld tool’s source into my tool, replacing everything, and it does nothing serverside when I use it.
Well, I just accidentally shift-deleted my addon in its entirety. Time to remake, and this time I’m going to use a swep, to rid myself of this nonsense.
Now if only I’d memorized my other code verbatim…