I am having trouble with the following code. What I want is for it to allow me to move freely, when I login. Once I login now, I cannot move at all, which is what i need help with. One more thing, how exactly would I check if Src and M are standing on the same turf? I dont mean both standing at the same oview(0) distance. I mean on the same turf, a little distance away. Thanks in advance
client
Move(mob/M as mob in world)
start
if(usr.Battle==1)
return
if(usr.isturn==0)
return
if(usr.turnee >= 0) usr.turnee -= 1
..()
if(usr.turnee<=0)
usr<<"Ending Turn."
usr.turnee=0
usr.isturn=1
else
usr<<"It isn't your turn"
goto start
ID:148574
![]() Dec 28 2002, 10:58 am
|
|
Second, your use of goto is bad here. In about 99.9% of cases, you don't need goto at all and it's easier to just use a loop construct. I think what you were trying to go for was a while loop:
Lummox JR