ID:145129
 
mob
var
Walking=1

mob
Aitest
icon = 'ai.dmi'
while(!Walking)
walk(East)
while(Walking)
walk(West)

atom/proc/Bumped()

mob
Bump(atom/A)
A.Bumped(src)
..()
turf
death
density=1
Bumped(mob/M)
if(istype(M,/mob))
del M

ground
icon='turfs.dmi'
icon_state="1"
density=1
Bumped(mob/M)
if(!Walking)
Walking=0
if(Walking)
Walking=1

error:Walking:value not allowed here
error::duplicate definition
error:Walking:duplicate definition
error:East:value not allowed here
error::duplicate definition
error:West:value not allowed here
error::duplicate definition
error::empty type name (indentation error?)
error:Walking:undefined var
error:Walking:undefined var
error:Walking:undefined var
error:Walking:undefined var

i have defined the vars but its not seeing it what am i doing wrong. I want it when a guy walks into a wall he turns around.
mob
Aitest
icon = 'ai.dmi'
while(!Walking)
walk(East)
while(Walking)
walk(West)

You might want to use the New proc with that...
In response to A.T.H.K (#1)
mob
var
Walking=1

mob
Aitest
icon = 'aitest.dmi'
Walkers()

mob
proc
Walkers()
while(!Walking)
walk(src,east) //error
while(Walking)
walk(src,west)// error
Bumped()
if(!Walking)
Walking=0
if(Walking)
Walking=1

turf
death
density=1
Bumped()


turf
proc
Bumped()
del src


Well i got the code down to just 2 errors its saying the east and west are undefined i don't sure what i should do with them.
In response to Yorae (#2)
any direction in walk and step has to be in all CAPS

EAST

WEST

NORTH

SOUTH

NORTHEAST

etc etc
In response to A.T.H.K (#3)
A.T.H.K wrote:
any direction in walk and step has to be in all CAPS


Which is because they are actually not variables but preprocessor definitions, which correspond to numbers. Check out the reference, I forget what entry it's under but somewhere it talks about the whole system.