ID:146358
 
Code:
obj
Spar_Partner
icon='turf.dmi'
icon_state="spar"
density = 1
name = "Sparring Partner"
verb
Train()
set category = "Temp"
set src in oview (1)
var/mob/players/M
for(M in get_step(src,src.dir))
if(!M.training)
if(M.level<=4)
M << "You begin to spar."
M.training = 1
walk(M,EAST,Lag=10)
walk(src,WEST,Lag=10)
walk(M,WEST,Lag=10)
walk(src,EAST,Lag=10)
walk(M,WEST,Lag=10)
walk(src,EAST,Lag=10)
walk(M,EAST,Lag=10)
walk(src,WEST,Lag=10)
walk(M,SOUTH,Lag=10)
walk(src,NORTH,Lag=10)
walk(M,NORTH,Lag=10)
walk(src,SOUTH,Lag=10)
walk(M,0)
walk(src,0)
M << "Finished."
M.exp += 1
M.CheckLevel()
M.training = 0
else
M << "You are too high leveled to train with this!"
else
M << "You're already training!"


/*
Objects.dm:17:error:walk :expected 2 to 3 arguments (found 1).
*/


Problem description: I'm not sure if I'm using walk() right, but I'm using the format straight out of the Reference. What am I doing wrong?

I don't know if this has anything to do with it, but try replacing this:

proc/LevelUp(var/mob/players/M)


with this:

proc/LevelUp( mob/players/M )

proc/CheckLevel() 
if(src.expneeded<=src.exp) LevelUp(src)

In the CheckLevel(), and LevelUp() try changing all of the "M" to src.
In response to Cerebral Assassin
Oh, wow, thanks.
Take out "Lag=" in walk().
In response to Ol' Yeller
I tried that. Apparantly, now the walk isn't doing anything at all, and training is finished instantly rather than the desired effect of 5 or 6 seconds.
I'd think without the lag part, walk would be a replicant of what step would be, although step doesn't work at all either.
My goal here is to create a pattern of movements in a 4x4 area that simulates sparring.

Nevermind, I'll just use step() and sleep().