hmm Although I'm more clear about what the SetKey does, it's not entirely clear where to put them exactly. This is the menu option.
group:AddProperty( "showicon",PROPERTY_BOOL,"","Show hand icon")
I've added this to the spawn function :
function Spawn(model)
model:SetKey("showicon","1")
This way when a new switch is being dragged on, it has a default value of 1 (true).
Next there is the function SetKey(model,key,value). I've place a new model.setkey command but here I get an error.
function SetKey(model,key,value)
entitymodel:SetKey("showicon","true")
The error message "attempt to index global 'entitymodel' (a nill value)". What does this error mean exactly?