SWEP:DrawHUD() problem

Hi, I have a problem

lua/weapons/weapon_hammer.lua


 function SWEP:DrawHUD()  
local trace = self.Owner:GetEyeTrace() 
if trace.Entity.CHECK == true then
print('yes')
else
print('no')
end  
end


CHECK, in the console shows an error. “nil”

Other code below:

lua/autorun/server/propspawn.lua


local e = ents.Create( data.class )
if !e or !e:IsValid() then return end
e:SetRenderMode( RENDERMODE_TRANSALPHA )
e:SetPos(data.pos)
e:SetAngles(data.ang)
e:SetModel(data.model)

e.CHECK = true


Sorry bad english, help please…

What are the exact errors you get?

“no” writing out, also



 function SWEP:DrawHUD()  
local trace = self.Owner:GetEyeTrace() 
print(trace.Entity.CHECK)
end

“nil” console out. help…

It looks like you are setting CHECK to true on the server, but you are trying to retrieve it’s value on the client (it’s not networked, they are completely separate). If this is for an entity you are making then have a look at datatables which will network the value for you.

Examples would you do? I did not apply…