ID:146813
 
mob/verb/Geticon(O in view())
set category = "Social"
if(M.NoGet == 1)
return
else
usr << ftp(O:icon)


Im making a game where poeple upload icons and make them objs but they can let other poeple get the icon, but some poeple dont want to so make this NoGet variable so poeple cant get it.I made the objs have this variable but it wont work on this.Can anyone help?
Urm...you didn't define M, try O.noget, and try not using :, use .
In response to N1ghtW1ng
When I changed the M to an O it still doesnt work, and when I change the : on the bottom to a . it makes an error to it, I think the bottom one works.The onley error I have is the O.NoGet == 1 part, Says this when I do it,...

Build.dm:18:error:O.NoGet:undefined var
As I'm sure you've seen by now, the M should be an O. However, because of the lack of type casting, that still won't work. In DM, you must be as specific as possible about your variables. Also, don't use the : operator.

Furthermore, instead of if(myVar==1) and if(myVar==0) checks, use if(myVar) and if(!myVar): it's much, much more robust.

Finally, instead of an if(O.NoGet) else chain, you can get by with if(!O.NoGet).

mob/verb/Get_Icon(obj/O as obj in view())
set category = "Social"
if(!O.NoGet)
usr << ftp(O.icon)