• attempt to index local 'object' (a function value)
    2 replies, posted
Hello, I am getting this error and don't know how to fix it. [CODE][ERROR] lua/includes/util.lua:181: attempt to index local 'object' (a function value) 1. IsValid - lua/includes/util.lua:181 2. WriteEntity - lua/includes/extensions/net.lua:52 3. OnRun 4. func 5. unknown - lua/includes/extensions/net.lua:32[/CODE] Code: (:snip: due to job) [CODE] OnRun = function(Player, Trace) util.AddNetworkString("test") util.AddNetworkString("test2") net.Start("test") net.Send(Player) net.WriteEntity(ply) net.Receive("test2", function(len, ply) local minutes = net.ReadInt(8) end) end[/CODE]
It's probably because you're using ply instead of Player for the net.WriteEntity. Furthermore you probably want the net.Send and net.WriteEntity the other way around
[QUOTE=Goz3rr;50966845]It's probably because you're using ply instead of Player for the net.WriteEntity. Furthermore you probably want the net.Send and net.WriteEntity the other way around[/QUOTE] Thanks, commenting that out since I don't use it anyway fixed it!
Sorry, you need to Log In to post a reply to this thread.