ID:852399
 
(See the best response by Kaiochao.)
Code:
verb/Grab(target as obj | mob in get_step(src, src.dir))
if(target.Grabbable)
//Blablabla code


Problem description:

I previously defined a Grabbable var for both objs and mobs, and yet it doesn't work. It says... 'target.Grabble is an undefined var'

It seems so basic.. what is the issue here?


Edit: Lol, the works, how did I even type that accidentally.
Best response
You didn't declare 'target' as an object that has a 'Grabbable' variable.
verb/Grab(obj/target // ...)
// or
verb/Grab(mob/target // ...)
// or even their parent, if you defined 'Grabbable' for it:
verb/Grab(atom/movable/target)
Ahhhh, so I have to actually let it know the variable is going to be of said type, I assumed the 'as' bit did that on it's own.

So if I did...

atom/movable/Grabbable = 1
verb/Grab(atom/movable/target as obj | mob in get_step(src, src.dir))


It would work just fine?