• Player name (nil)
    2 replies, posted
I get this error message in DarkRP: [ERROR] addons/darkrpmodification-master/lua/darkrp_modules/spedhud/cl_hud.lua:73: attempt to call method 'Nick' (a nil value)   1. fn - addons/darkrpmodification-master/lua/darkrp_modules/spedhud/cl_hud.lua:73    2. unknown - addons/ulib_557962238/lua/ulib/shared/hook.lua:109 local muns = DarkRP.formatMoney((LocalPlayer():getDarkRPVar("money") || 0)) local playername = ply:Nick()     draw.SimpleText(ply:Nick(),"text",135,ScrH() -1070,Color(255,255,255,220),1,TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)     draw.SimpleText(ply:getDarkRPVar( "job" ),"Bartext",384,ScrH() -1070,Color(255,255,255,220),1,TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)     draw.SimpleText(money,"text",600,ScrH() -1070,Color(255,255,255,220),1,TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)     draw.SimpleText("$"..ply:getDarkRPVar( "salary" ),"text",700,ScrH() -1070,Color(255,255,255,220),1,TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER) I don't understand what is the problem in this?
Try using LocalPlayer():Nick() instead.
Ye I mean I guess you can expect some errors when just copy and paste code from random places... local ply = LocalPlayer() if not IsValid(ply) then return end local muns = DarkRP.formatMoney(ply:getDarkRPVar("money") || 0) local playername = ply:Nick()
Sorry, you need to Log In to post a reply to this thread.