I had thought about that, but I'm not sure how to break out of the loop once a threshold was reached.
In most cases it's easier and more logical just to shutdown the script. Breaking the loop would probably screw something up and you'd have to reset anyway.
On Sat, Oct 10, 2009 at 8:52 PM, Stuart P. Bentley <stuart@testtrack4.com> wrote:
debug.sethook will let you count the number of line
executions.
Sent: Saturday, October 10, 2009 P5:33
Newsgroups: gmane.comp.lang.lua.general
Subject: Infinite Loop Detection
I've seen infinite loop detection used in applications before.
(Garry's Mod) Does anyone know how to go about creating something like
this. It doesn't have to necessarily check for an infinite as much as hit a
threshold limit for how many time a loop can repeat itself. Any Ideas?
Thanks
|