Help with GLON

When i try to encode a vehicle in glon, it sends back an error stating that “Vehicle” is not a valid type. I even double checked on the gmod wiki and it states that glon supports vehicle encoding. Any ideas on how to fix this? Thnx in advance. =)

I’m aware of this. I e-mailed an update to Garry, but he hasn’t replied nor acted on the issue

Here’s a temporary fix (untested, should work):

for i = 1, math.huge do
local k,v = debug.getupvalue(glon.encode, i)
if not k then
elseif k == “type” then
debug.setupvalue(glon.encode, i, function(t)
t = type(t)
return t == “Vehicle” and “Entity” or t

Same problem with the “Weapon” entity.

I inserted the code just above from where glon.encode is called and i’m still recieving the error “Failed: includes/modules/glon.lua:154: Tried to write unwriteable type: Vehicle”. Did I put it in the wrong place??


I’ve looked around online some more and played with the code a bit, but still nothing. Anyone have a different fix or maybe an alternative way to encoding vehicles?