bug in GLON

GLON doesn’t accept Vehicles, Weapons or NPCs, at least on the server side.

Here is a patch that fixes this problem. it needs to be applied to glon.lua:
http://codepad.org/2lx1TrgV - adds a small for loop that copies the handler for “Entity” to Vehicles, Weapons and NPCs.

I hope someone can get this into gmod :slight_smile:

If you’re at a loss for ideas, you could try storing Entity:GetTable() and just restore the table when you need to retrieve the info.

You can make the change to the one on the Wiki if you want, I don’t mind.
I can’t really be stuffed doing this myself.
Hell, you could even send it to Garry.

Why don’t you send it to garry along with the fix from the previous thread? >:3

I’ve sent stuff to garry in the past, never got any answers
I don’t care either anymore. I have this fix in wiremod, and it’s working perfectly:
[lua]hook.Add(“InitPostEntity”, “wire_expression2_glonfix”, function()
– Fixing other people’s bugs…
for i = 1,20 do – lazy…
local name, encode_types = debug.getupvalue(glon.Write, i)
if name == “encode_types” then
for _,tp in ipairs({“NPC”,“Vehicle”,“Weapon”}) do
if not encode_types[tp] then encode_types[tp] = encode_types.Entity end
end
break
end
end
end)[/lua]

Didn’t he say he already sent it?

I said I “can’t be stuffed doing it”, which means I’m too lazy to go to the effort of doing it.

Just put your new version onto codepad.org and change the link on the wiki… Then tell Garry via whatever method that the new version is ready to be copied and pasted.

I pasted the updated version at http://codepad.org/SIO9mmjB and also linked it here: http://wiki.garrysmod.com/?title=Glon#Online_Viewable_Source
highlighted garry on #fpcoders, let’s see if that works