ID:140190
 
Code:
turf
Click(turf/T)
if(usr.inwindblade)
if(T.density==0)


Problem description:

Ok so, for a while now I have been getting this odd runtime error that says...

runtime error: Cannot read "map".density
proc name: Click (/turf/Click)
source file: Click System.dm,319
usr: Killua (/mob)
src: Game Name (512,318,1) (/turf/cliff4)
call stack:
Game Name (512,318,1) (/turf/cliff4): Click("map", "mapwindow.map", "icon-x=29;icon-y=14;left=1;scr...")

line 319 is the "if(T.density==0)" line, Im not quite sure what is causing it not to be able to see the map's density.

If someone could help me understand why this is doing this, or help me fix it, that would be much Thanked.
Click(turf/T) does not filter out only turfs. You need to put an if(isturf(T)) line in there.
In response to Garthor
Thanks for the reply Garthor, I am a bit confused on the placement of this however...

I assume it is ment to be placed here..?

turf
Click(turf/T)
if(isturf(T))
if(usr.inwindblade)
if(T.density==0)
In response to Matt3151
Any time before you are attempting to actually treat T as a turf. So, there works.