Discussion Forums at Tactical Neuronics


Re: Variable Looping problems... From:
John Reder

How does debug show this line?:

if value vp < 0 then math vp = #x_pos - #enemy_x

To me, it looks like it's still possible to generate a negative number here if the enemy is beneath you.

Hope this helps,
John

> ok, i've got a basic bug with a seek & destroy attitude, but for some reason the variables are getting weird.
> heres the problem code:
> hunt:
> ;heres where the numbers, if negative, should be fixed
> if value vp < 0 then math vp = #x_pos - #enemy_x
> end if
> math v1 = ~vp - 1
> goto run
>
> run:
> assign vw 1
> loop:
> move forward
> math vw = ~vw + 1
> ;next line problem!
> if value vw = ~v1 then goto start2
> end if
> goto loop
>
> in debug, on the problem line, it says :
> if vw = -6 then goto start2
>
> but i ought to have already stopped it from being minus numbers.

This message is a Reply to: Variable Looping problems... from Nutty

Replies to this message:


© 2001, John A. Reder.