Skip to content

Commit

Permalink
Added: String normalizations for (value or "")
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdvideo1234 committed Aug 10, 2018
1 parent 9c4a304 commit 1639885
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lua/autorun/trackassembly_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ local asmlib = trackasmlib

------ CONFIGURE ASMLIB ------
asmlib.InitBase("track","assembly")
asmlib.SetOpVar("TOOL_VERSION","5.460")
asmlib.SetOpVar("TOOL_VERSION","5.461")
asmlib.SetIndexes("V",1,2,3)
asmlib.SetIndexes("A",1,2,3)
asmlib.SetIndexes("WV",1,2,3)
Expand Down
11 changes: 5 additions & 6 deletions lua/weapons/gmod_tool/stools/trackassembly.lua
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function TOOL:ApplyLinearFirst()
end

function TOOL:GetModel()
return (self:GetClientInfo("model") or "")
return tostring(self:GetClientInfo("model") or "")
end

function TOOL:GetCount()
Expand Down Expand Up @@ -201,7 +201,7 @@ function TOOL:GetIgnoreType()
end

function TOOL:GetBodyGroupSkin()
return self:GetClientInfo("bgskids") or ""
return tostring(self:GetClientInfo("bgskids") or "")
end

function TOOL:GetGravity()
Expand Down Expand Up @@ -229,7 +229,7 @@ function TOOL:GetLogLines()
end

function TOOL:GetLogFile()
return (asmlib.GetAsmVar("logfile","STR") or "")
return tostring(asmlib.GetAsmVar("logfile","STR") or "")
end

function TOOL:GetAdviser()
Expand Down Expand Up @@ -1319,10 +1319,9 @@ function TOOL.BuildCPanel(CPanel)
pText.OnKeyCodeTyped = function(pnSelf, nKeyEnum)
if(nKeyEnum == KEY_TAB) then
local sTX = asmlib.GetPropBodyGroup()..gsSymDir..asmlib.GetPropSkin()
pnSelf:SetText(sTX)
pnSelf:SetValue(sTX)
pnSelf:SetText(sTX); pnSelf:SetValue(sTX)
elseif(nKeyEnum == KEY_ENTER) then
local sTX = pnSelf:GetValue() or ""
local sTX = tostring(pnSelf:GetValue() or "")
RunConsoleCommand(gsToolPrefL.."bgskids",sTX)
end
end; CurY = CurY + pText:GetTall() + 2
Expand Down

0 comments on commit 1639885

Please sign in to comment.