HUD Error

This is the error called

[ERROR] lua/includes/modules/draw.lua:147: bad argument #1 to 'len' (string expected, got nil)
  1. len - [C]:-1
   2. DrawText - lua/includes/modules/draw.lua:147
    3. fn - addons/darkrpmodification-master/lua/darkrp_modules/hudreplacement/cl_hudreplacement.lua:121
     4. unknown - addons/ulib/lua/ulib/shared/hook.lua:183

And this is the line
draw.DrawText(salary, “salary”, 82, ScrH() - height - 90, Color(255, 255, 255, 255 )) – Salary Number

You haven’t defined salary

salary is nil.

[editline]12th December 2013[/editline]

I loled. draw.DrawText checks the len in its function.

I have defined salary, right here = local salary = LocalPlayer():getDarkRPVar(“salary”)

[editline]12th December 2013[/editline]

It does work in game I just get that error

oh if it works just prints this once, then thats normal. You get the variable send to you only like a second after joining the serverso its nil for a while. Just do local salary = LocalPlayer():getDarkRPVar(“salary”) or 0

Thanks alot!