A.I. Code

by Rifthaven
Learn how to create an A.I. system for mobs. Have enemies who attack on sight and those who attack when you attack them! Uses little CPU usuage since they only move when they are in your screen! Comes with Attacking system aswell.
trying to use this but it seems like my monsters are throwing runtime errors by bumping into walls:

untime error: undefined variable /turf/wall/var/client
proc name: Bump (/mob/Monsters/enemy/Bump)
usr: (src)
src: the enemy (/mob/Monsters/enemy)
src.loc: the tunnelfloor (22,40,1) (/turf/tunnelfloor)
call stack:
the enemy (/mob/Monsters/enemy): Bump(the wall (22,39,1) (/turf/wall))
the enemy (/mob/Monsters/enemy): Move(the tunnelfloor (22,40,1) (/turf/tunnelfloor), 2, 0, -13)
the enemy (/mob/Monsters/enemy): Wander()
the enemy (/mob/Monsters/enemy): New(the tunnelfloor (22,41,1) (/turf/tunnelfloor))