ID:179475
 
Ok i am trying to make another random battle thing but in a cave so when you get into a random battle it has a cave scenery and not grass and stuff
Well any wasy this is what i have
mob/proc
randomencounter10(mob/M)
var/turf/c/R
for(R in world)
if(!R.occupied)
usr<<sound('dq4battle.mid',1)
R.occupied=1
usr.oldlocx=usr.x
usr.oldlocy=usr.y
usr.oldlocz=usr.z
usr.c=R
spawn(1)M.loc=(M.c)
M.oldbattlefield = M.onbattlefield
M.onbattlefield = null
M<<"Fight!"
M<<"Click on the monster to start."
spawn(1) new/mob/healy(locate(M.c.x,M.c.y+3,M.c.z))
return 1
It gives me bad c vars when they are defiind right in the code i posted
all i did was copy it and changed the T.occupied thing and the b for a turf to c and i gacve it the occupied var as well
So can someone please help?
Thanx
You're defining R not c, each var has to be defined indiviualy, example:

var/turf/R
var/turf/c


Get it?
In response to Nadrew
Hey thanx Nadrew
I thought i had it but i looked up at my other random battle code and there was a
mob/var/turf/b
so i put a
mob/var/turf/c
and it worked
Thanx