well, i am coding a new hud for my new gamemode lobby, and i am getting this error when i spawn:
lobby\gamemode\cl_HUD.lua:19: 'end' expected (to close 'function' at line 2) near '<eof>'
even though i have gone through the code loads of times, and even got N++ to check it, it still gives me the error. Here is the code :
local function myhud()
local client = LocalPlayer()
if !client:Alive() then
return
end
local money = client:GetNWInt( "money" )
if money == nil then
money = 0
end
draw.RoundedBox(0, 5, ScrH()-100, 200, 35, Color(0, 0, 0, 225))
draw.RoundedBox(0, 5, ScrH()-65, 200, 15, Color(0, 0, 250, 150))
draw.SimpleText("Your Health Is At " .. client:Health() .. " %", "ScoreboardText", 20, ScrH()-92, Color(255, 255, 255, 255), 0, 0)
draw.RoundedBox(0, 225, ScrH()-100, 200, 35, Color(0, 0, 0, 225))
draw.RoundedBox(0, 225, ScrH()-65, 200, 15, Color(0, 250, 0, 150))
draw.SimpleText("You Have " .. tonumber( money ) .. " Emeralds", "ScoreboardText", 240, ScrH()-92, Color(255, 255, 255, 255), 0, 0)
end
hook.Add("HUDPaint", "myhud", myhud)