mob
player
icon='player.dmi'
icon_state="suit"
var
cNavSkill = 55//navigator skill on scale 01-100
proc
checkNav()
//generate random placement errors
var/navErrorX = rand (1,100)
var/navErrorY = rand (1,100)
//adjust x-dir error by cNavSkill
navErrorX -= src.cNavSkill
navErrorY -= src.cNavSkill
Problem description:
I get a "src.cNavSkill: undefined var" on both lines where it's called in the proc. It happens regardless of whether I use "usr.cNavSkill" or "src.cNavSkill" to call the variable in the proc. I've been reading a lot lately on how I should normally be using "src" instead of "usr" to call variables, and it was while I was changing variable definitions around that I got this error.
I only want this variable assigned to "player" type mobs. It must be an obvious thing, but I sure can't seem to figure it out. I guess I don't understand variables well enough yet.