ID:146283
 
Code:
client/Click(mob/M)
if(!M)
return..()
else
usr<<"<center>[M]</center>"
usr<<"<center>Powerlevel: [M.powerlevel]</center>"
usr<<"<center>Strength: [M.strength]</center>"
usr<<"<center>Defense: [M.defense]</center>"


Problem description: It attempts to work on turfs too and I get a runtime runtime error: undefined variable /turf/grass/var/powerlevel
proc name: Click (/client/Click)
usr: Cheetoz (/mob)
src: Cheetoz (/client)
call stack:
Cheetoz (/client): Click(the grass (27,38,1) (/turf/grass), the grass (27,38,1) (/turf/grass))

And I need help to figure how to disregard turfs because I thought i did that...

Cheetoz wrote:
Code:
client/Click(mob/M)
> if(!M)
> return..()
> else
> usr<<"<center>[M]</center>"
> usr<<"<center>Powerlevel: [M.powerlevel]</center>"
> usr<<"<center>Strength: [M.strength]</center>"
> usr<<"<center>Defense: [M.defense]</center>"
>

Problem description: It attempts to work on turfs too and I get a runtime runtime error: undefined variable /turf/grass/var/powerlevel
proc name: Click (/client/Click)
usr: Cheetoz (/mob)
src: Cheetoz (/client)
call stack:
Cheetoz (/client): Click(the grass (27,38,1) (/turf/grass), the grass (27,38,1) (/turf/grass))

And I need help to figure how to disregard turfs because I thought i did that...


if(!istype(M,/turf)){
Its not a turf :)
}


-- Green Lime
Use if(ismob(ref)).
In response to Green Lime
yeah, use
if(!(ismob(M))) return

or something like that. Mine's easier than that other one.

or maybe, this:
if(!(ismob(M)))
usr << "Hey stupid, that's not a character!"
usr.stupidity += 1


and put stupidity in your stats...

That was random, but I had to let it out once I thought it.

--Vito
In response to Green Lime
thanks alot