It's been broken since I first started using Wiremod in August, and it doesn't look like anyone will ever fix. Bad luck, man.
Hud indicator doesn't work it shows some text in console and I will copy it later today here.
92% of teens have moved onto rap. If you are part of the 8% that still listen to real music, copy and paste this into your signature.
98% of teens smoke, or have smoked before in their life. If you are part of the 2% that hasn't/doesn't, copy this into your sig.
Visit here www.gamersdreamforum.tk
It's my own forum that isn't fully ready yet so I need people to help improve it.
It's been broken since I first started using Wiremod in August, and it doesn't look like anyone will ever fix. Bad luck, man.
I've used it dozens of times since august.... please post console dump.
It says:
entities/gmod_wire_hudindicator/cl_init.lua:167: bad argument #1 to 'GetTextSize' (string expected, got nil)
Apparently ther are no definitoin of the text size in the script, i think it would be easy to fix.
If you need further info here's the script that's wrong:
local function HUDFormatDescription( eindex )
// This is placed here so we don't have to update
// the description more often than is necessary
local indinfo = hudindicators[eindex]
if (indinfo.ShowValue == 0) then // No Value
hudindicators[eindex].FullText = indinfo.Description
elseif (indinfo.ShowValue == 1) then // Percent
hudindicators[eindex].FullText = indinfo.Description.." ("..string.format("%.1f", ((indinfo.Factor or 0) * 100)).."%)"
elseif (indinfo.ShowValue == 2) then // Value
// Round to up to 2 places
hudindicators[eindex].FullText = indinfo.Description.." ("..string.format("%g", math.Round((indinfo.Value or 0) * 100) / 100)..")"
end
// Do any extra processing for certain HUD styles
// so we aren't calculating this every frame
surface.SetFont("Default")
local textwidth, _ = surface.GetTextSize(hudindicators[eindex].FullText) <---- THIS IS APPARENTLY WRONG
if (indinfo.Style == 1) then // Gradient
local ent = ents.GetByIndex(eindex)
if (ent && ent:IsValid()) then
local r, g, b, _ = ent:GetColor()
hudindicators[eindex].DisplayColor = Color(r, g, b, 160)
local textcolor = Color(255, 255, 255, 255)
if (r >= 192 && g >= 192 && b >= 192) then
// Draw dark text for very bright Indicator colors
textcolor = Color(32, 32, 32, 255)
end
hudindicators[eindex].TextColor = textcolor
end
elseif (indinfo.Style == 2) then // Percent Bar
local pbarwidth = math.max(textwidth + 16, 100) // The extra 16 pixels is a "buffer" to make it look better
hudindicators[eindex].BoxWidth = pbarwidth
hudindicators[eindex].W1 = math.floor((indinfo.Factor or 0) * pbarwidth)
hudindicators[eindex].W2 = math.ceil(pbarwidth - hudindicators[eindex].W1)
elseif (indinfo.Style == 3) then // Full Circle Gauge
local ang = math.rad(math.fmod((indinfo.Factor or 0) * 360 + (indinfo.FullCircleAngle or 0), 360))
hudindicators[eindex].LineX = math.cos(ang) * 32
hudindicators[eindex].LineY = math.sin(ang) * 32
hudindicators[eindex].BoxWidth = math.max(textwidth + 16, 80)
elseif (indinfo.Style == 4) then // Semi-Circle Gauge
local ang = math.rad((indinfo.Factor or 0) * 180 + 180)
hudindicators[eindex].LineX = math.cos(ang) * 32
hudindicators[eindex].LineY = math.sin(ang) * 32
hudindicators[eindex].BoxWidth = math.max(textwidth + 16, 80)
end
end
// Function to ensure that the respective table index is created before any elements are added or modified
// The HUDIndicatorRegister umsg is *supposed* to arrive (and be processed) before all the others,
// but for some reason (probably net lag or whatever) it isn't (TheApathetic)
local function CheckHITableElement(eindex)
if (!hudindicators[eindex]) then
hudindicators[eindex] = {}
end
end
Current learning status:Expression chip: Grand master (seriously, I can rival Syranide) Lua: Qute good CPU: I get it... I think, But why the registers? Moongate: I'll look into it when i get time...
Code:ents.GetByIndex(0):Remove()
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>
entities/gmod_wire_hudindicator/init.lua:160: bad argument #1 to 'String' (string expected, got nil)
Error - Starting new message without ending the old one!
entities/gmod_wire_hudindicator/cl_init.lua:167: bad argument #1 to 'GetTextSize' (string expected, got </div>
Oh you made it first. I have samekind console text I c/p it directly from console
92% of teens have moved onto rap. If you are part of the 8% that still listen to real music, copy and paste this into your signature.
98% of teens smoke, or have smoked before in their life. If you are part of the 2% that hasn't/doesn't, copy this into your sig.
Visit here www.gamersdreamforum.tk
It's my own forum that isn't fully ready yet so I need people to help improve it.
I'm getting that error as well sometimes. It works if I just load the default preset and remake it.
Code:entities/gmod_wire_hudindicator/cl_init.lua:167: bad argument #1 to 'GetTextSize' (string expected, got nil)
It rarely works for me, same error, but randomly it DOES work, like on LAN servers (when a friend copies my gmod folder and uses it on the server since I am the only one who knows how to make everything work)
Bookmarks