SimpleText not being drew?

For some reason a simpletext on the HUD is not showing
Here is the code for the names


	surface.SetFont( "Arial" )
	local PlayerName = LocalPlayer():Name()
	local Width, Height = surface.GetTextSize(PlayerName)
	if Width > 100 then
		font = "Arialsmall"
	else
		font = "Arialsmall"
	end
	
	surface.SetFont( "Arialsmall" )
	local wh, hw = surface.GetTextSize(PlayerName)
	if font == "Arialsmall" and wh > 100 then
		PlayerName = string.sub( LocalPlayer():Name(), 1, 18 )
	end
	
	if font == "Arial" and Width < 100 then
		local PlayerName = LocalPlayer():Name()
	end
	draw.SimpleText( PlayerName, font, 100, Height - 120 , Color( 51, 153, 255 ), ALIGN_TEXT_LEFT )

I tried changing the x and y pos to see if it was being drew but it is not?
Also, it is in the HUDPaint hook.

I wont be fucking helping you anymore.
You are creating a thread for everyone of your problems and you arent closing them!
WE ALREADY TOLD YOU.
USE
THIS
THREAD
http://forum.facepunch.com/showthread.php?t=1508566&page=76

where the fuck do u define font lol

[editline]4th August 2016[/editline]

also u cant localize a local variable

Height is defined as the height in pixels of the text given, for a given font. You set the Y coordinate as height minus 120. As the height of the font can be safely assumed to be less than 120, you are drawing this text at a negative Y, which would draw it off screen.

You are declaring the local variable PlayerName, which is perfectly fine, however instead of adjusting that variable inside the if statement, you create an entierly new variable with the same name defined only for the scope of the if statement block.

Defining a variable when preceding with local with invariable create an entirely new variable and will never change an existing one (unless some very clever programmer is using some very clever calls to the debug library). When you define a variable not preceded by the keyword local, it checks if a variable already exists in that name, going through each parent scope checking for a local, until it reaches the root global scope where it checks for a global. If an already existing variable is found, it changes the value it holds, if not, it creates a new global variable with that value.

TL;DR: Don’t precede PlayerName with the keyword local once you have defined a local variable of that name for a same of parent scope.