EDIT2: Found the solution. Here's all that I had to change to the code. I still don't know why it didn't work in the first place, but this small change fixed it.
Good old "oldx,oldy" ^.^
oldx=rnd(3)+1
oldy=rnd(3)+1
x=oldx
y=oldy
reset:
if x<>oldx or y<>oldy then goto fixed
position=rnd(7)+1
print position," ",x," ",y," |";
if position=1 and x<4 then inc x,1 else goto reset
if position=2 and x>1 then dec x,1 else goto reset
if position=3 and y<4 then inc y,1 else goto reset
if position=4 and y>1 then dec y,1 else goto reset
if position=5 and y<4 and x<4
inc y,1:inc x,1
else
goto reset
endif
if position=6 and x>1 and y>1
dec y,1:dec x,1
else
goto reset
endif
if position=7 and x<4 and y>1
dec y,1:inc x,1
else
goto reset
endif
if position=8 and x>1 and y<4
inc y,1:dec x,1
else
goto reset
endif
fixed:
print "that was annoying"
EDIT: Everyone else as stumped as I am? :\
Hey guys, you probably thought me dead.
Well every once in a while, I pop on and do some dark basic coding ^.^ Anyhow, I'm working on a secret program (
) but I'm not sure why this little script isn't working. I'm sure a single glance at it will make sense what I'm trying to do. I want it to create a range between 1-4 in x, and 1-4 in y. increasing both, decreasing both, increasing one, decreasing one. It's relatively simple... but for some reason it just isn't working. I have it creating a visual, that should help solve the problem.
Thanks.
-Irojo
x=rnd(3)+1
y=rnd(3)+1
reset:
position=rnd(7)+1
print position," ",x," ",y," |";
if position=1 and x<4 then inc x,1 else goto reset
if position=2 and x>1 then dec x,1 else goto reset
if position=3 and y<4 then inc y,1 else goto reset
if position=4 and y>1 then dec y,1 else goto reset
if position=5 and y<4 and x<4
inc y,1:inc x,1
else
goto reset
endif
if position=6 and x>1 and y>1
dec y,1:dec x,1
else
goto reset
endif
if position=7 and x<4 and y>1
dec y,1:inc x,1
else
goto reset
endif
if position=8 and x>1 and y<4
inc y,1:dec x,1
else
goto reset
endif
Time is money. I just ripped you off.