Hi,
I get the following error when I run a macro. I do not have 2 loops in that macro. But I have 2 'obey' functions. Is it why I do get this error? I am very grateful if someone can help. This only occurs after few loops in the main macro worked well.
error while obeying batch file D:\****\***\Codes\code5.txt at line number 1:
loop b306 1 B30
nested loops must be in seperate obey files
Thank you very much....
Error in nested loops
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Error in nested loops
The shouldn't be a limitation on the number of calls to obey that you can make within a macro. If you could provide a simplified example that demonstrates the problem then I will investigate this further.
Re: Error in nested loops
Say, I have the main code as 'code1'. Inside that there is an obey command to call 'code2'. Inside 'code2' also there are two obey commands that call 'code3' and 'code4'. When I run 'code1', after some iterations I get this error. The error shows in the loop command in 'code4'.ChrisCharlton wrote: Thu Oct 19, 2017 4:29 pm The shouldn't be a limitation on the number of calls to obey that you can make within a macro. If you could provide a simplified example that demonstrates the problem then I will investigate this further.
I am very much thankful if you could help...
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Error in nested loops
I tried to replicate the error with the following macros:
code1.txt:
code2.txt:
code3.txt:
code4.txt:
However I did not get the error that you are seeing.
code1.txt:
Code: Select all
SAY "inside code1"
LOOP b1000 1 10000
OBEY "code2.txt"
ENDLOOP
Code: Select all
SAY "inside code2"
OBEY "code3.txt"
OBEY "code4.txt"
Code: Select all
SAY "inside code3"
Code: Select all
SAY "inside code4"
Re: Error in nested loops
I tired changing few values inside the code. Now the error is not coming.ChrisCharlton wrote: Fri Oct 20, 2017 9:00 am I tried to replicate the error with the following macros:
code1.txt:code2.txt:Code: Select all
SAY "inside code1" LOOP b1000 1 10000 OBEY "code2.txt" ENDLOOP
code3.txt:Code: Select all
SAY "inside code2" OBEY "code3.txt" OBEY "code4.txt"
code4.txt:Code: Select all
SAY "inside code3"
However I did not get the error that you are seeing.Code: Select all
SAY "inside code4"
Thank you very much for taking your time for this.
-
- Posts: 3
- Joined: Mon Dec 11, 2017 3:02 am
Re: Error in nested loops
Keep up the good work ddsswick
You're dedicated to this site!!
Im also looking for this!!
You're dedicated to this site!!
Im also looking for this!!