diff --git a/addon.json b/addon.json index dc706894f9..d50f9dd2ff 100644 --- a/addon.json +++ b/addon.json @@ -15,7 +15,7 @@ "git-hooks-pre-commit", "gitrid.sh", "LICENSE", - "wiremod.*" + "wiremod.*", "benchmark_*" ] } diff --git a/lua/entities/gmod_wire_customprop/shared.lua b/lua/entities/gmod_wire_customprop/shared.lua index 97a62c2be5..22264dff67 100644 --- a/lua/entities/gmod_wire_customprop/shared.lua +++ b/lua/entities/gmod_wire_customprop/shared.lua @@ -58,8 +58,8 @@ return { classname = "gmod_wire_customprop", readReliableEntity = function(callback) - index = net.ReadUInt(16) - creationIndex = net.ReadUInt(32) + local index = net.ReadUInt(16) + local creationIndex = net.ReadUInt(32) local startTime = CurTime() local function check() diff --git a/lua/wire/server/sents_registry.lua b/lua/wire/server/sents_registry.lua index 8ffc2cfdf4..4514b69ad4 100644 --- a/lua/wire/server/sents_registry.lua +++ b/lua/wire/server/sents_registry.lua @@ -1137,8 +1137,8 @@ register("gmod_wire_value", { VECTOR2 = function(val, e2TypeID) if e2TypeID == TYPE_TABLE and #val >= 2 and isnumber(val[1]) and isnumber(val[2]) then return val[1]..", "..val[2] end if e2TypeID == TYPE_STRING then - local x,y,z = string.match( val, "^ *([^%s,]+) *, *([^%s,]+) *$" ) - if x and y and z then return x..", "..y..", "..z end + local x,y = string.match( val, "^ *([^%s,]+) *, *([^%s,]+) *$" ) + if x and y then return x..", "..y end end return nil @@ -1201,7 +1201,7 @@ register("gmod_wire_value", { elseif e2TypeID == TYPE_VECTOR then val = {"VECTOR", castE2TypeToWireValueType["VECTOR"](val, e2TypeID)} elseif e2TypeID == TYPE_ANGLE then val = {"ANGLE", castE2TypeToWireValueType["ANGLE"](val, e2TypeID)} elseif e2TypeID == TYPE_STRING then val = {"STRING", castE2TypeToWireValueType["STRING"](val, e2TypeID)} - else return "Incorrect 'value' parameter #"..i.." type! Expected table (Ex. table(\"normal\", 0)). Got: "..type( steamid ) end + else return "Incorrect 'value' parameter #"..i.." type! Expected table (Ex. table(\"normal\", 0)). Got: "..type( val ) end elseif not isnumber(val[1]) then -- Plain table if TypeID(val[1]) ~= TYPE_STRING then return "Incorrect 'value' parameter #"..i.."[1] type! Expected string ('NORMAL/VECTOR/VECTOR2/VECTOR4/ANGLE/STRING'). Got: "..type( val ) end @@ -1214,15 +1214,15 @@ register("gmod_wire_value", { end val = {wireValueType, CastFunc(val[2], TypeID(val[2]))} elseif #val == 2 then -- vector2 - local tempVal = castE2TypeToWireValueType["VECTOR2"](val[2], typeID(val[2])) + local tempVal = castE2TypeToWireValueType["VECTOR2"](val, TypeID(val)) if not tempVal then return "Incorrect 'value' parameter #"..i.." value! Expected 'VECTOR2'. Got: "..tostring(val[2]) end val = {"VECTOR2", tempVal} elseif #val==4 then -- vector4 - local tempVal = castE2TypeToWireValueType["VECTOR4"](val[2], typeID(val[2])) - if not tempVal then return "Incorrect 'value' parameter #"..i.." value! Expected 'VECTOR2'. Got: "..tostring(val[2]) end + local tempVal = castE2TypeToWireValueType["VECTOR4"](val, TypeID(val)) + if not tempVal then return "Incorrect 'value' parameter #"..i.." value! Expected 'VECTOR4'. Got: "..tostring(val[2]) end val = {"VECTOR4", tempVal} else