The complier gives me an error which states that there is only 1 argument given instead of 2/3. Here is my coding
mob/PC/verb
shoot()
if(usr.rightarm == "Pistol")
var/obj/pistol = new/obj/shot/pistol(locate(usr.x,usr.x,usr.z))
walk(pistol,usr.dir,Lag=2)
I'm not sure if the error is the actual walk line or if its somewhere above. It might be some silly mistake, I'm just coming back to BYOND and getting used to the language once more..
Thank you for your help.
ID:175393
Apr 27 2003, 2:41 pm
|
|
In response to LordJR
|
|
I read that before I posted, I think I'm doing everything correctly...It would be good if you would point out the error.
|
SSChicken wrote:
mob/PC/verb----------------------- mob/PC/verb shoot() if(src.rightarm == "Pistol") var/obj/pistol = new/obj/shot/pistol(locate(src.loc)) walk_towards(pistol,usr,Lag=2) |
mob/PC/verb
shoot() if(usr.rightarm == "Pistol") var/obj/pistol/O = new/obj/shot/pistol(locate(usr.x,usr.x,usr.z)) walk(O,usr.dir,Lag=2) |
In response to LordJR
|
|
The thing is, "Lag=2" just needs to be "2", there is no variable called "Lag" defined by default.
|
See also:
get_step proc
step proc
Format:
walk(Ref,Dir,Lag=0)
Args:
Ref: A mob or obj.
Dir: One of NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST, or 0 to halt.
Lag: Delay in 1/10 seconds between movement.
Move Ref in the direction Dir continuously. Each step will be preceded by Lag time of inactivity.
A call to a walking function aborts any previous walking function called on Ref. To halt walking, call walk(Ref,0).
This function returns immediately, but continues to process in the background.