• Error removes HUD
    6 replies, posted
Hi, I own a DarkRP server unfortunately, and I'm getting this error: [CODE] [ERROR] addons/wire/lua/entities/gmod_wire_hudindicator/cl_init.lua:56: attempt to call field 'MakeSortedKeys' (a nil value) 1. fn - addons/wire/lua/entities/gmod_wire_hudindicator/cl_init.lua:56 2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183 [/CODE] Now, I've added absolutely nothing that I can recall since that started. I did add a few ULX plugins, but the server was running fine with them. Here's addons/ulib/lua/ulib/shared/hook.lua:181-184 [CODE] -- Call hook function if isstring( v.name ) then a, b, c, d, e, f = v.fn( ... ) else [/CODE] Here's the whole function around 1. of the error: [CODE] local function DrawHUDIndicators() if (!LocalPlayer():Alive()) then return end local currenty = hudy // Now draw HUD Indicators for _, index in ipairs(table.MakeSortedKeys(hudindicators)) do if (hudindicators[index]) then // Is this necessary? local ent = Entity(index) if IsValid(ent) then local indinfo = hudindicators[index] if (!indinfo.HideHUD && indinfo.Ready) then local txt = indinfo.FullText or "" if (indinfo.Style == 0) then // Basic draw.WordBox(8, hudx, currenty, txt, "Default", Color(50, 50, 75, 192), Color(255, 255, 255, 255)) elseif (indinfo.Style == 1) then // Gradient draw.WordBox(8, hudx, currenty, txt, "Default", indinfo.DisplayColor, indinfo.TextColor) elseif (indinfo.Style == 2) then // Percent Bar //surface.SetFont("Default") //local pbarwidth, h = surface.GetTextSize(txt) //pbarwidth = math.max(pbarwidth + 16, 100) // The extra 16 pixels is a "buffer" to make it look better local startx = hudx //local w1 = math.floor(indinfo.Factor * pbarwidth) //local w2 = math.ceil(pbarwidth - w1) local pbarwidth = indinfo.BoxWidth local w1 = indinfo.W1 local w2 = indinfo.W2 if (indinfo.Factor > 0) then // Draw only if we have a factor local BColor = indinfo.BColor surface.SetDrawColor(BColor.r, BColor.g, BColor.b, 160) surface.DrawRect(startx, currenty, w1, pbarheight) startx = w1 + hudx end if (indinfo.Factor < 1) then local AColor = indinfo.AColor surface.SetDrawColor(AColor.r, AColor.g, AColor.b, 160) surface.DrawRect(startx, currenty, w2, pbarheight) end // Center the description (+ value if applicable) on the percent bar draw.SimpleText(txt, "Default", hudx + (pbarwidth / 2), currenty + (pbarheight / 2), Color(255, 255, 255, 255), 1, 1) elseif (indinfo.Style == 3) then // Full Circle Gauge draw.RoundedBox(8, hudx, currenty, indinfo.BoxWidth, 88 + dtextheight, Color(50, 50, 75, 192)) surface.SetTexture(fullcircletexid) surface.DrawTexturedRect(hudx + 8, currenty + 8, 64, 64) local startx = hudx + 40 local starty = currenty + 40 surface.SetDrawColor(0, 0, 0, 255) surface.DrawLine(startx, starty, startx + indinfo.LineX, starty + indinfo.LineY) // Now the text draw.SimpleText(txt, "Default", hudx + (indinfo.BoxWidth / 2), currenty + 72 + (pbarheight / 2), Color(255, 255, 255, 255), 1, 1) elseif (indinfo.Style == 4) then // Semi-Circle Gauge draw.RoundedBox(8, hudx, currenty, indinfo.BoxWidth, 56 + dtextheight, Color(50, 50, 75, 192)) surface.SetTexture(semicircletexid) surface.DrawTexturedRect(hudx + 8, currenty + 8, 64, 32) local startx = hudx + 40 local starty = currenty + 39 surface.SetDrawColor(0, 0, 0, 255) surface.DrawLine(startx, starty, startx + indinfo.LineX, starty + indinfo.LineY) // Now the text draw.SimpleText(txt, "Default", hudx + (indinfo.BoxWidth / 2), currenty + 40 + (pbarheight / 2), Color(255, 255, 255, 255), 1, 1) end // Go to next "line" currenty = currenty + offsety[indinfo.Style + 1] end else // Clear this from the table so we don't check again hudindicators[index] = nil end end end end hook.Add("HUDPaint", "DrawHUDIndicators", DrawHUDIndicators) [/CODE] What's wrong, and how can I fix it? Thanks guys!
Is your wiremod up-to-date?
I SVN updated it a day or two ago.
Alright had a look in to it. There's a few issues with Wiremod right now after 165 and 13.06.07 so you'll have to either go fix it all yourself, or wait a few days for the Wiremod team to sort things out.
Okay. I'm only a lua beginner so I'll wait. Thanks man!
For reference: [url]http://www.wiremod.com/forum/installation-malfunctions-support/31854-wiremod-broken-last-update.html[/url]
Odd, I have NFO too edit: mibshidobu's comment worked!
Sorry, you need to Log In to post a reply to this thread.