am_sy
December 16, 2010, 9:14am
1
hi guys
i created a sequence of about 12 frames, then copied it to script.
in the script, i delete all delays and write the sub "moving_wait.
i run the script.
it worked very well but after 8 loops it stopped and i got the eror "staks overflow/underflow"
what should i do in order to run infinite loops?
thanks!
paul
December 16, 2010, 4:19pm
2
Hello,
Please post the entire script here. It is really hard to debug code without seeing it!
-Paul
am_sy
December 17, 2010, 11:15am
3
hi,
here is the script:
# original 12 loops (13)
begin
500 5578 5851 6398 5441 6453 5961
5277 8257 6398 6808 4731 6070
6234 5441 0 0 0 0 frame_0..17 # BL landing 1
500 6207 6617 4566 5004 4840 frame_1_9_10_12_13 # FL up
500 5879 6043 6836 5004 5359 7547
6043 6234 5086 6180 5414 5086 frame_2..13 # FL cross
500 5824 5851 5988 6125 6398 5578
5660 7820 6398 6262 4813 6043
6344 5195 frame_0..13 # FL landing
500 6125 5742 6043 6426 5605 5538
8476 5633 5961 5633 6125 6070
5359 frame_1..13 # BR up
500 6070 5742 5387 5879 6262 6043
5605 5851 5879 5523 frame_0..5_9..12 # balance
500 6207 5851 5578 5933 6398 6016
4731 7847 5305 5961 5988 5961
5605 frame_0..7_9..13 # BR cross
500 6098 5441 6344 5988 4785 8230
5851 5660 5578 5851 6180 6590 frame_1_2_4..13 # BR landing
500 5742 5004 7875 5742 5797 6699
7847 6371 frame_1_6..8_10..13 # FR up
500 5660 5332 6508 5687 6234 6207
5141 8531 6289 5277 5715 6453
6945 6836 frame_0..13 # FR cross 1
500 5961 6316 6207 6289 5113 8832
6398 6262 6699 6289 frame_1_2_4..8_11..13 # FR landing 1 option
500 5687 5906 6098 5523 6508 6180
5332 7984 6371 6672 4047 5851
6781 6426 frame_0..13 # BL up & cross 2
repeat
sub frame_0..17
17 servo
16 servo
15 servo
14 servo
13 servo
12 servo
11 servo
10 servo
9 servo
8 servo
7 servo
6 servo
5 servo
4 servo
3 servo
2 servo
1 servo
0 servo
moving_wait
return
sub frame_1_9_10_12_13
13 servo
12 servo
10 servo
9 servo
1 servo
moving_wait
return
sub frame_2..13
13 servo
12 servo
11 servo
10 servo
9 servo
8 servo
7 servo
6 servo
5 servo
4 servo
3 servo
2 servo
moving_wait
return
sub frame_0..13
13 servo
12 servo
11 servo
10 servo
9 servo
8 servo
7 servo
6 servo
5 servo
4 servo
3 servo
2 servo
1 servo
0 servo
moving_wait
return
sub frame_1..13
13 servo
12 servo
11 servo
10 servo
9 servo
8 servo
7 servo
6 servo
5 servo
4 servo
3 servo
2 servo
1 servo
moving_wait
return
sub frame_0..5_9..12
12 servo
11 servo
10 servo
9 servo
5 servo
4 servo
3 servo
2 servo
1 servo
0 servo
moving_wait
return
sub frame_0..7_9..13
13 servo
12 servo
11 servo
10 servo
9 servo
7 servo
6 servo
5 servo
4 servo
3 servo
2 servo
1 servo
0 servo
moving_wait
return
sub frame_1_2_4..13
13 servo
12 servo
11 servo
10 servo
9 servo
8 servo
7 servo
6 servo
5 servo
4 servo
2 servo
1 servo
moving_wait
return
sub frame_1_6..8_10..13
13 servo
12 servo
11 servo
10 servo
8 servo
7 servo
6 servo
1 servo
moving_wait
return
sub frame_1_2_4..8_11..13
13 servo
12 servo
11 servo
8 servo
7 servo
6 servo
5 servo
4 servo
2 servo
1 servo
moving_wait
return
sub moving_wait
begin
get_moving_state
while
repeat
return
paul
December 17, 2010, 4:21pm
4
Hello,
It looks like the beginning of each line has the number 500, which used to be used by the DELAY command, but since you have deleted the DELAYs, those 500’s just build up until the stack overflows. When you run your script, you should be able to see the stack and verify that it is getting filled up with 500’s.
Delete the 500’s, and it will probably work fine!
-Paul