SUGGESTION: Disable while loop iteration check (IMPLEMENTED)

Started by monkey0506, Mon 08/08/2005 03:23:23

Previous topic - Next topic

monkey0506

I started a topic a while back when I was having some problems with too many while loop iterations, and Chris said something about implementing an option to disable the 150000 loop check.  Well, I didn't want to have to ask him directly about it, so I'm asking here.  Also, I had an idea about it.  Instead of a global option, perhaps it could be a function that would get used like:

function func_name() {
  DisableCheck(eWhileLoop);
  /* blah */
  }

So that the check for while loop iterations would be disabled for the duration of the call to the function.  Or perhaps it wouldn't have to completely disable the check, but just not crash the game because of that check.  Then, if the game did crash it could say something like:  "Game encountered fatal error running function "func_name".  DisableCheck called from within function.  Try removing this line from the function to determine cause of crash." or something...  Thanks for any help on figuring out when this will be implemented.

Pumaman

#1
I agree that this would be useful, and I'll look into implementing it.

Edit by strazer: Implemented in AGS v2.71 Beta 4

monkey0506

Well in order to initialize my struct variables I need either this or String arrays and the ability to use Strings as struct members.  Thanks in either case.

Ishmael

At some point I've come up with a use for the while loop which the check then came and ruined... The downsided is that I don't remember what that idea was :\ But yeah, this would be usefull.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

fred

Yeah. let's have a function like that.

@monkey: While we're waiting for it, just remember that although the large arrays can't be iterated through from beginning to end, they work just fine if you just need to acces sub-parts of them - if it's not necessary to initialize or access all indices at once. Splitting the iterations up between different functions may also help, as I think I've done somewhere in my script.

fred

monkey0506

Hmm...I suppose that as a temporary fix I could just work with the first 25 dialogs.  Seeing that 200 * 30 * 25 = 150000.  And 500 / 25 = 20.  I don't want to have to create 20 functions.  But for testing purposes the first 25 dialogs should be enough.  Thanks for the idea.

SMF spam blocked by CleanTalk