ID:178120
 
proc/hospital(treatment)
var/T = treatment
world << "hospital proc running..."
for(T in world)
world << "checking"
if(locate(/mob) in T.contents)// ERROR HERE
continue
else
usr << "You have made it into a hospital bed!"
usr.loc = T
break

mob/proc/healing()
var/type = input("What type of healing do you want?") in list("Minimal","Normal","Advanced","Free")
switch(type)
if("Minimal")
hospital(/turf/medic/Minimal)
if("Normal")
hospital(/turf/medic/Normal)
if("Advanced")
hospital(/turf/medic/Advanced)
if("Free")
hospital(/turf/medic/Free)


It gives me a T.contents error. Why won't it let me define the type of turf in the proc? I know that I COULD do a seperate one for each of the turfs, but I think this is more efficient....


-ST
Is treatment a datum you created?
In response to Super16
I define the treatment here,

if("Free")
hospital(/turf/medic/Free)
Why not,

isloc(/mob,T.contents)

or

T.contents.Find(/mob)
T.contents isn't recognized because your code doesn't know that T is supposed to be an atom. You should define it as a turf, mob, obj, area, or whatever it is.

Lummox JR