Draw pointshop points on screen error?


local function DrawPoints()

        local playerpoints = LocalPlayer():Ps_GetPoints() --Only defining it inside this function for precautions.

	draw.RoundedBox(6, 100, 50, 100, 23, Color( 0, 0, 0, 255 ) )
		draw.SimpleText(playerpoints, ScrW() / 2 - 70, ScrH() - 63, Color(255,255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) 	--These text co-ordinates aren't configured properly to show on screen in the right place


It’s used to draw the player points on screen although i’m sure there is something wrong with it? When I add this into cl_init it gives an error to do with draw.SimpleText im sure but rather sais theres an error with some text which I never got until I add this?

Post the error?

Im going to try it on another gamemode and test if it works (Deathrun) Ill post back the results

Ok this time theres a different error but rather explains itself. I dont understand why this happens though?

It’s :PS_GetPoints(), uppercase S.

[editline]8th July 2014[/editline]

Ok iv’e managed to fix it but now I get this

Your args are wrong.
Here’s the syntax from the wiki:

draw.SimpleText( string text, string font, number x, number y, table color, number xAlign, number yAlign )

613 = Your Screenwidth /2 - 70 so it tries to use that as the font.
Use this if you need info on fonts: http://wiki.garrysmod.com/page/surface/CreateFont

ok what ive got now

draw.SimpleText(playerpoints, "Trebuchet18",  ScrW() / 2 - 650, ScrH() - 90, Color(255,255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) 

Have I done something wrong here?

That line looks alright.
You should also read Mista Tea’s response in the other thread just in case.