ID:148827
 
What i need to do is to check whehter a area is at the usrs location and call a proc for it, this is what i have so far,

for(var/area/A in src.loc)
src.client.images -= A.coverimage


But it still doesnt work, can anyone help?

var/atom/a = src.loc
if(isarea(a))
src.client.images -= a:coverimages
Since users belong to mobs...

Assuming your game uses turfs, your mob's loc is the turf that it exists on, the turf's loc is the area that it exists in. So mob.loc.loc is the area your mob is currently in, and the area that your mob's loc is currently in.

So if you want to edit a variable for the area you are currently in, just do this:
<code> var/area/a = usr.loc.loc a.var = new_value a.Proc()</code>

Etc...
In response to Foomer
For some reason it tells me that Entered when i run my game, is null.Entered

proc name: Login (/mob/aggresive/Player/Login)
usr: Mrhat99au (/mob/aggresive/Player)
src: Mrhat99au (/mob/aggresive/Player)
call stack:
Mrhat99au (/mob/aggresive/Player): Login()
Mrhat99au (/mob/aggresive/Player): Read(players.sav (/savefile))
Mrhat99au (/mob/ppp/Choosin): LoadPlayer("Mrhat99au")
Mrhat99au (/mob/ppp/Choosin): CC()
Mrhat99au (/mob/ppp/Choosin): Login()

Its like entered isnt define even though it is.
In response to Mrhat99au
Bump its been 6 days. Still cant figure it out.
In response to Mrhat99au
Mrhat99au wrote:
Bump its been 6 days. Still cant figure it out.

Your thread died because you didn't post nearly enough information to explain the problem. null.Entered() isn't being called according to your error messages, so your account of the problem and your debug messages are in disagreement. None of that has the slightest thing to do with the code you posted at the beginning of this thread, and you didn't even show us what proc that code goes in.

If you want someone to help you, post more than 2 lines of code and give it a little frelling context.

Lummox JR