Hey a HUD I downloaded from: [url]http://www.garrysmod.org/downloads/?a=view&id=126167[/url]
is giving this error:
[CODE][ERROR] gamemodes/darkrp/gamemode/client/hud.lua:48: attempt to compare number with string
1. formatNumber - gamemodes/darkrp/gamemode/client/hud.lua:48
2. DrawPlayerInfo - gamemodes/darkrp/gamemode/client/hud.lua:148
3. DrawHUD - gamemodes/darkrp/gamemode/client/hud.lua:305
4. unknown - gamemodes/darkrp/gamemode/client/hud.lua:401[/CODE]
Please help :)
~~~ Note to admins ~~~
Please do not ban me if I have posted this in the wrong section. I just need some urgent help. :)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Its funny people say its easy to get banned from facepunch .. it is .. if you don't read the sticky/rules and post the wrong places.
Yep you posted the wrong place .. this forum is the developer's talk-place. You're only allowed to ask for help here if you're making an addon/gamemode/module .. ect
If you got any problems playing/using an addon/mod you should post it here: [url]http://facepunch.com/forumdisplay.php?f=16[/url]
Anyway damage is don.
Your problem is line 48: [lua]if n >= 1e14 then return tostring(n) end[/lua]
I guess Phoeni meant it should be[lua]if n>=114 then return tostring(n) end[/lua]
Thankyou I will remember that link
I am still getting:
[ERROR] gamemodes/darkrp/gamemode/client/hud.lua:48: attempt to compare number with string
1. formatNumber - gamemodes/darkrp/gamemode/client/hud.lua:48
2. DrawPlayerInfo - gamemodes/darkrp/gamemode/client/hud.lua:148
3. DrawHUD - gamemodes/darkrp/gamemode/client/hud.lua:305
4. unknown - gamemodes/darkrp/gamemode/client/hud.lua:401
Though after a LUA refresh it works? I had some different errors earlier see here: [url]http://facepunch.com/showthread.php?t=1227506[/url]
This code is in the lua file clienthud.lua in my autorun:
if SERVER then AddCSLuaFile() return end
local oldCF = surface.CreateFont
function surface.CreateOldFont( font_name, osize, oweight, aa, oadditive, new_font_name, drop_shadow, outlined, oblur, scanline )
oldCF( new_font_name, { font = font_name, size = osize, weight = oweight, antialias = aa or false, additive = oadditive, shadow = drop_shadow or false, outline = outlined or false, blursize = oblur or 0, scanlines = scanline or 0 } )
end
function surface.CreateFont( font_name, osize, oweight, aa, oadditive, new_font_name, drop_shadow, outlined, oblur, scanline )
if type(osize) == "number" then
return surface.CreateOldFont( font_name, osize, oweight, aa, oadditive, new_font_name, drop_shadow, outlined, oblur, scanline )
else
return oldCF( font_name, osize )
end
end
surface.CreateOldFont( "Trebuchet MS", 18, 900, true, false, "Trebuchet18" )
surface.CreateOldFont( "Trebuchet MS", 19, 900, true, false, "Trebuchet19" )
surface.CreateOldFont( "Trebuchet MS", 20, 900, true, false, "Trebuchet20" )
surface.CreateOldFont( "Trebuchet MS", 22, 900, true, false, "Trebuchet22" )
surface.CreateOldFont( "Trebuchet MS", 24, 500, true, false, "Trebuchet24" )
surface.CreateOldFont( "Trebuchet MS", 17, 700, true, false, "TabLarge", true )
surface.CreateOldFont( "Default", 16, 800, true, false, "UiBold" )
surface.CreateOldFont( "coolvetica", 32, 500, true, false, "ScoreboardHeader" )
surface.CreateOldFont( "coolvetica", 22, 500, true, false, "ScoreboardSubtitle" )
surface.CreateOldFont( "coolvetica", 19, 500, true, false, "ScoreboardPlayerName" )
surface.CreateOldFont( "coolvetica", 15, 500, true, false, "ScoreboardPlayerName2" )
surface.CreateOldFont( "coolvetica", 22, 500, true, false, "ScoreboardPlayerNameBig" )
surface.CreateOldFont( "Trebuchet MS", 40, 900, false, false, "HUDNumber" )
surface.CreateOldFont( "coolvetica", 48, 500, true, false, "ScoreboardHead" )
surface.CreateOldFont( "coolvetica", 24, 500, true, false, "ScoreboardSub" )
surface.CreateOldFont( "Tahoma", 16, 1000, true, false, "ScoreboardText" )
surface.CreateOldFont( "Tahoma", 13, 700, false, false, "TabLarge", true )
surface.CreateOldFont( "Tahoma", 13, 100, false, false, "DefaultOld" )
surface.CreateOldFont( "Tahoma", 13, 1000, false, false, "DefaultBold" )
function ValidEntity(ent)
return IsValid(ent)
end
Also should that code be in a LUA file IN the client folder?
[editline]3rd April 2013[/editline]
Nevermind I fixed it
[editline]3rd April 2013[/editline]
Lock this
Just use the one I uploaded. Its a bit bigger and has a bit more color in it.
I don't take credit for making it, just editing it.
[url]http://www.garrysmod.org/downloads/?a=view&id=133871[/url]
Sorry, you need to Log In to post a reply to this thread.