• attempt to call field 'AddNetworkString' (a nil value)
    1 replies, posted
I'm trying to use networks so that a GUI sends a message to the server. I fixed all but 1 bug... I would like this to be answered as fast as possible because school is tomorrow. Code: function GM:Initialize()     util.AddNetworkString("SummonObject")     self.BaseClass.Initialize(self) end Error: [ERROR] gamemodes/gsims/gamemode/shared.lua:8: attempt to call field 'AddNetworkString' (a nil value)   1. unknown - gamemodes/gsims/gamemode/shared.lua:8
That's a serverside function. Pull it out of the initialize hook like this: if SERVER then util.AddNetworkString("SummonObject") end
Sorry, you need to Log In to post a reply to this thread.