proc/object_check() //This will check if the object will fit inside players back pack.
if(src.obj_weight + usr.inv_weight > usr.inv_max)
usr << "Doesn't fit inside your back pack"
return
else
src.loc = usr
src.obj_weight += usr.inv_weight
usr << "picked up [src]"
Even if the object is too heavy, it tells me "Doesnt fit inside your back pack" but it still ends up in my inventory.
Please help me.