Ok so I just finished bashing my head in the wall for 3 hours. Either the net library is broken or I am just really really stupid.
All you really need to see is this
[CODE]
if CurTime()-time>1 then
time = CurTime()
net.Start("DrawMenu")
print(thisent)
net.WriteInt(thisent)
net.Send(act)
end
[/CODE]
Here is the output in console
[CODE]
4
[ERROR] addons/disguise_kit/lua/entities/disguise_kit/init.lua:43: bad argument #2 to 'WriteInt' (number expected, got no value)
1. WriteInt - [C]:-1
2. unknown - addons/disguise_kit/lua/entities/disguise_kit/init.lua:43
[/CODE]
The 4 in that output is the variable thisent. I am fairly sure 4 is an integer which leads me to be confused by the following output.
ALL HELP IS APPRECIATED!!!:buddy:
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/net/WriteInt]net.WriteInt[/url] has two Arguments ...
[LUA]
net.WriteInt(thisent, 32)
[/LUA]
next time read the site properly
Well I am going to kill myself, thank you for the help though!
I kind of figured I could leave that argument blank like you can with other functions, but it was stupid of me to not try it.
Sorry, you need to Log In to post a reply to this thread.