• Sending Doubles
    1 replies, posted
function TOOL:SetupObjective( Ent ) Ent.Settings = {} Ent.Settings.Time = self:GetClientInfo( "time" ) print("The TOOL ",self:GetClientInfo( "time" )) net.Start("SpliceGUI") net.WriteDouble(self:GetClientInfo( "time" )) //net.WriteString("Fuck networking") net.Send(self.Owner) //print(Ent) //Ent:SetupSettings() end file that sends^ if SERVER then util.AddNetworkString("SpliceGUI") AddCSLuaFile("autorun/swep_net.lua") end local FillMaterial, CubeMaterial = Material( "models/props_combine/com_shield001a" ) net.Receive("SpliceGUI",function(len,ply) local double = math.floor(net.ReadDouble()) print("Received double ", double) if CLIENT then  print("Client ", double) file that receives^ Received double: -1 Client -1 Received double: 0 Client 0 Received double: 0 Client 0 client side output^ obj_autorun update successful npc_spawnplatform reloaded npc_spawnplatform reloaded The TOOL 33.40 The TOOL 40.19 server side output^ So basically, I am passing a double from one file to another. The file that has the value I am passing reads it correctly as shown above, but the receiving end does not. I do have all of the util.AddNetworkString("SpliceGUI") where they are needed but it still doesnt work. Any suggestions as to what I can do?
You need to use net.SendToServer when sending client -> server
Sorry, you need to Log In to post a reply to this thread.