Please help me solve this paradox...

[lua] if self.ply == nil then
self.ply = LocalPlayer()
else
self.icon:SetModel(self.ply:GetModel())
end[/lua]

4th line: Tried to use a NULL entity.
That’s on multiplayer.
It works on singleplayer…

You have add your files with **[G.AddCSLuaFile

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=G.AddCSLuaFile)** ?

Yes. Even if I wouldn’t add them, they would still run on my own multiplayer server…
Your question is totally pointless.

nil != NULL
If you only check for nil it can still be a NULL entity.
Try changing


if self.ply == nil then

to


if !IsValid( self.ply ) then

G.IsValid

Hm… It’s weird.
It worked tho. Thank you!

No problem!

i like how you called it a paradox… just saying

I thought NULL == nil, and I checked whether self.ply == nil then give it a value. Otherwise, if not nil then run that function.
If NULL would have been the same as nil, it would have been a paradox.