turf
var/descriptor = "notset"
var/turfname = "notset"
Debug
icon = 'turf_debug.dmi'
Grass
icon_state = "grass"
turfname = "grass"
descriptor = "It is green and healthy. Its length barely reaches your ankles and is soft to the touch."
TallGrass
icon_state = "tallgrass"
turfname = "tall grass"
descriptor = "It is green and healthy. Its length reaches your chest and is very difficult to see through."
mob
verb
Search_Environment()
var T = new usr.loc
usr << "The floor beneath your feet is [T.turfname]. [T.descriptor]"
Problem description:
I am attempting to reference two vars that are used in /turf by grabbing usr.loc and referencing that turf inside /mob/verb. The vars fail as undefined since I don't fully understand how types work, it seems.
TextRPG.dme:17:error: T.turfname: undefined var
TextRPG.dme:17:error: T.descriptor: undefined var
2mobs.dm:26:warning: T: variable defined but not used
Edit: To clarify, I know I can fix this by placing the verb in /turf, but I want to access these variables as the player moves around as well. I'll inevitably have to reference these during /mob activity, right?