Expanding HUD if the text is longer then the HUD Box?

Hello, I just finished my HUD to 99%…
Except that when your Job Name is longer than the box, the text will go outside.
I need the box to expand, I tried RelativeX and Y stuff but didn’t work, I am not a pro in lua… Just started.
Thx.

You would use this:
http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index2ce8-2.html

-snip-
Can’t get it to work online, it works on singleplayer…

I get


[ERROR] gamemodes/darkrp/gamemode/client/hud.lua:190: bad argument #1 to 'GetTextSize' (string expected, got nil)

Line 189 - 190:
[lua]
local job = LocalPlayer().DarkRPVars.job
Width, Height = surface.GetTextSize( job )
[/lua]

Do print(LocalPlayer().DarkRPVars.job)

See what it returns

Try removing ‘local’ from in front of job variable. You might be calling Width or Height from somewhere you shouldn’t.

Still the same bro… :confused: