Hello.
I have a lua error I dont know how to fix.
[ERROR] addons/darkrpmodification-master/lua/darkrp_modules/scoreboard/cl_scoreboard.lua:77: Tried to use a NULL entity!
1. Team - [C]:-1
2. unknown - addons/darkrpmodification-master/lua/darkrp_modules/scoreboard/cl_scoreboard.lua:77
On line 77 I have this
surface.SetFont("Info-15")
teamSize = surface.GetTextSize( team.GetName(pl:Team()) )
nickSize = surface.GetTextSize( pl:Nick() )
If you know how to fix it, then I would love to hear from you.
Check if pl is valid
What does that mean. ?
[lua]
if not IsValid(pl) then
return
end
surface.SetFont("Info-15")
teamSize = surface.GetTextSize( team.GetName(pl:Team()) )
nickSize = surface.GetTextSize( pl:Nick() )
[/lua]
You're the man both of you. Thx a lot.
Sorry, you need to Log In to post a reply to this thread.