ID:144155
 
Code:
mob/var/isfish
mob/var/fishchance
mob/var/catch

mob
verb
fish(mob/M in view(3))
set name = "cast out"
set category = "Fishing"
if(M.isfish==1)
usr.fishchance=rand(1,3)
if(usr.fishchance==3)
usr<<"The fish gets away!"
else
usr<<"The fish goes for the bait!"
usr.verbs+=/mob/verb/reelin()
usr.catch="[M]"
mob
verb
reelin()
set name = "Reel in"
set category = "Fishing"
usr.catch(step_towards(usr))
client
North()
if(usr.fishchance==1||usr.fishchance==2)
step(usr,NORTH)
step(usr.catch,NORTH)


Problem description:
well for some reason the usr.catch(step_towards(usr)) line
gets 2 errors and i dont get what is wrong with it.
errors:
fishing.dm:24:error:usr.catch:undefined proc
fishing.dm:24:error:step_towards :expected 2 arguments(found 1).


Look at the error. catch is not a procedure, yet you are trying to use it as such. You have define catch as a variable, though. This will help you out a lot.

mob/var/fishchance
mob/var/fish/catch

mob/fish
icon='fish.dmi'
verb/fish()
set name = "cast out"
set src in view(3) //Only use if it's within 3 spaces
set category = "Fishing"
if(prob(66)) // 2/3 chance of catching
usr<<"The fish goes for the bait!"
usr.verbs+=/mob/verb/reelin()
usr.catch=src //Set the fish that the usr is catching to this fish
else
usr<<"The fish gets away!"

mob
verb
reelin()
set name = "Reel in"
set category = "Fishing"
step_towards(usr.catch,usr) //this is the proper format for step_towards()
client
North()
if(usr.fishchance==1||usr.fishchance==2)
step(usr,NORTH)
step(usr.catch,NORTH)

I think this should work. You shouldn't use variables like "isfish" when there's a perfectly good type system in BYOND :P