ID:263281
 
Code:
mob/verb
Spar()
for(var/mob/M in oview(1))
if(usr.dir == NORTH)
if(M.dir == SOUTH)
if(M.can_spar== 1)
var/ask = input(M,"Wanna Spar Bitch","Spar")in list("Yes","No")
if(ask == "Yes")
M.frozen=1
usr.frozen=1
usr<<"You begin to spar with [M]"
M<<"You begin to spar with [usr]"
M.Sparing()
usr.Sparing(usr, M)
if(ask == "No")
usr<<"I think [M] think your a punk"


Problem description:
It gets up to the point where it asks you would you like to spar then even if they say yes or no it dosent continue... Why?

You've got this completeley wrong....You used the for() proc,which makes no sense at all in this coding and u used way too many if() procs which could all be slimmed down into one line of code.Here's what u should do:
 mob
verb
Spar(mob/M in world)
if(usr.dir=NORTH&&M.dir=SOUTH&&M.can_spar)
if(alert(M,"[usr] wants to sparr with you,Accept?","Sparr?","Yes","No")=="Yes")
M.frozen=1
usr.frozen=1
usr<<"You begin to spar with [M]"
M<<"You begin to spar with [usr]"
M.Sparing()
usr.Sparing(usr, M)
else
usr<<"[M] dosen't want to spar"


If that dosen't work,then theres a problem with your Sparing() procs,and that's not my fault.
In response to Metamorphman
Metamorphman wrote:
You've got this completeley wrong....You used the for() proc,which makes no sense at all in this coding and u used way too many if() procs which could all be slimmed down into one line of code.Here's what u should do:
>  mob
> verb
> Spar(mob/M in world)
> if(usr.dir=NORTH&&M.dir=SOUTH&&M.can_spar)
> if(alert(M,"[usr] wants to sparr with you,Accept?","Sparr?","Yes","No")=="Yes")
> M.frozen=1
> usr.frozen=1
> usr<<"You begin to spar with [M]"
> M<<"You begin to spar with [usr]"
> M.Sparing()
> usr.Sparing(usr, M)
> else
> usr<<"[M] dosen't want to spar"
>

If that dosen't work,then theres a problem with your Sparing() procs,and that's not my fault.

lol i tried your code by the way it dosent work.................. So much for If that dosen't work,then theres a problem with your Sparing() procs,and that's not my fault. it didnt even get to the usr<<"You begin to spar with [M]" which is before my proc so you cant blame it on the proc
/me thinks Shukuto-San is gonna get forum spnk'd =(


As for the problem:

mob/verb
Spar(mob/m as mob in get_step(usr, dir)) //a mob a tile infront of you
if(m.dir == turn(usr.dir, 180)) //if he is facing you
if(m.can_spar) //no need for == 1, it's a boolean variable, meaning you can do this check to check if it's true,
//and add an ! to check if it's false (ex: if(!m.can_spar))
if(input(m, "input_text") in list("Yes", "No") == "Yes") //ask m if he wants to spar
//do spar stuff.


Enjoy. =)

edit of edit: Thanks for editing. :D
In response to DivineO'peanut
Thanks a bunch peanut
In response to Shukuto-San
 mob
verb
Spar(mob/M in get_step(usr,usr.dir))
if(alert(M,"[usr] wants to sparr with you,Accept?","Sparr?","Yes","No")=="Yes")
M.frozen=1
usr.frozen=1
usr<<"You begin to spar with [M]"
M<<"You begin to spar with [usr]"
M.Sparing()
usr.Sparing(usr, M)
else
usr<<"[M] dosen't want to spar"


untested, but my preference, well, one of them