IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#19183 - 11/30/05 04:10 PM Error Message
Uomo Del Ghiaccio Offline
OL Expert

Registered: 02/21/01
Posts: 669
What can you tell me about the following error message? 0 - 14:38:32 PTK0001 : Loop too long. Run error

Thanks
_________________________
Uomo Del Ghiaccio
--------------------

Top
#19184 - 11/30/05 04:49 PM Re: Error Message
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
This error message is most likely due to an infinite loop in a PressTalk code you made. This mean you created a loop(such as a repeat or a for), but there is no way out of it. So the loop is infinite, and it eventually show this error message.

The solution is to fix the loop by making sure the code eventually break it. Once you do that, this error message should go away. Make sure you click on the "Refresh" button once you fix the code.

Hope that helps.

Rapha

Top
#19185 - 11/30/05 06:27 PM Re: Error Message
Uomo Del Ghiaccio Offline
OL Expert

Registered: 02/21/01
Posts: 669
These are the only Macros in the form.

%set(&DHL_StartLine, 0)
%for([i]&
current.line,30,1,45)
%if('/' = @(&current.line,3,3))
%if('/' = @(&current.line,6,6))
%if('/' = @(&current.line,29,29))
%if('/' = @(&current.line,32,32))
%set(&DHL_StartLine, &current.line)
%endif()
%endif()
%endif()
%endif()
%endfor()

set(&DHL_StartLine, 0)
for(&current.line,30,1,45)
if(and('/' = @(&current.line,3,3), '/' = @(&current.line,6,6)))
if(and('/' = @(&current.line,29,29), '/' = @(&current.line,32,32)))
set(&DHL_StartLine, &current.line)

endif()
endif()
endfor()[/i]

This is used with a bunch of data selections such as "=@(&DHL_StartLine + 124 ,1,55), =trim(@(&DHL_StartLine + 112 ,1,22)), or =@(&DHL_StartLine + 33,1,35) + @(&DHL_StartLine + 34,1,2)".



moveto(0,0)
SetStyle(&LetterGothic)
margin(0,0.182)
rmoveto(stringwidth(' '),0)
rmoveto(neg(stringwidth(' ')),0)
Define(&z_,integer,0)
for(&z_,5,1,12)
if(ne(trimleft(@(&z_,67,100)),''))
if(not(gt(pos('C-D:',@(&z_,50,2000)),0)))
show(trimright(trimleft(@(&z_,67,100))))
crlf(0.1000)
endif()
endif()
endfor()
_________________________
Uomo Del Ghiaccio
--------------------

Top
#19186 - 12/01/05 04:39 PM Re: Error Message
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
Just before your first "for", add this line of code:

define(&x, integer, ¤t.line)

And in your first "for", instead of using ¤t.line, use &x.

The reason for this is that ¤t.line is a system variable that is already used by PlanetPress. So by using it in your loop, it might cause some conflicts, which may be the cause of the infinite loop.

Try it, and see if it works better.

Rapha

Top
#19187 - 12/01/05 06:20 PM Re: Error Message
Uomo Del Ghiaccio Offline
OL Expert

Registered: 02/21/01
Posts: 669
Here is the macro after the changes, but I'm still getting the loop errors.

define(&z_, integer, [i]&current.line)
set(&DHL_StartLine, 0)
for(&z_,30,1,45)
if(and('/' = @(&z_,3,3), '/' = @(&z_,6,6)))
if(and('/' = @(&z_,29,29), '/' = @(&z_,32,32)))
set(&DHL_StartLine, &z_)
endif()
endif()
endfor()
[/i]
_________________________
Uomo Del Ghiaccio
--------------------

Top
#19188 - 12/02/05 09:37 AM Re: Error Message
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
Do you have at least 45 lines in your data file? If not, and the loop goes beyond the maximum lines per pages of your data, you will get this error.

Also, the problem might not be caused by your code. If you erase the code completely, do you still get the error? Perhaps something else is causing it...

If you're still having problems, you can always report an issue via the web. To do so, click on "Report an issue via the web" to your left. This will allow you to upload your form so we can have a closer look at it.

Regards,
Rapha

Top
#19189 - 12/02/05 10:10 AM Re: Error Message
Uomo Del Ghiaccio Offline
OL Expert

Registered: 02/21/01
Posts: 669
I have somewhere between 150 to 200 lines on each page. I will report the issue.

Thanks
_________________________
Uomo Del Ghiaccio
--------------------

Top


Moderator:  cosimo, OL Newsgroup Support