Trigger Random Ends

Azylaminaz

Vox Populi
Reaction score
91
Just wondering, but does anyone know why and what the limit to how long a trigger and be executing (excluding waits)? Example would be making a trigger have a loop 0 to 32423423432, it won't finish the trigger, it just randomly aborts..

I was having a problem, just fixed it by splitting the trigger. o.o Now I'm just wondering so I know what limits I should be using.
 

Genyuumaru

New Member
Reaction score
15
Most likely it's an integer or a long integer.

The Number's size are either 32-bit or 64-bit.

I would say 32k (a little higher).
 

Azylaminaz

Vox Populi
Reaction score
91
In most languages, it is 2^31-1, or 2147483647. Considering my trigger refuses to loop 2000 times, I don't think it is the problem.

Also, it aborts the trigger at a randomish number, in a range. Like I can do Alt+QR 10 times and it will probably range between 1400 and 1700.
 

Genyuumaru

New Member
Reaction score
15
My only guess would be not enough memory? Ram? Memory leaks?

You could TRY creating a timer which expires every 0.01 seconds and does ~10 loops or something like that.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
> it aborts the trigger at a randomish number

It's pretty much exactly at 300000 micro-ops.

Now, a function call takes 2, a "set" takes 2, something like i + 1 takes 4...
For GUI, the guess is somewhere near 12000+ operations.

> excluding waits

With waits, they can, indeed, run much longer. Nearly forever that is.
 

Azylaminaz

Vox Populi
Reaction score
91
Interesting information, AceHart. Thanks

Now I'm having a similar problem, trigger aborts. Not the same problem is causing it, but the same symptoms, I guess. It is aborting at a specific function...

Code:
Set tg_tempReal[0] = (Distance between tg_River_Start[(Integer A)] and tg_River_Direction[(Integer A)])
Set tg_tempReal[1] = ((X of tg_River_Direction[(Integer A)]) - (X of tg_River_Start[(Integer A)]))
Set tg_tempReal[2] = ((Y of tg_River_Direction[(Integer A)]) - (Y of tg_River_Start[(Integer A)]))
[COLOR="Red"]Set tg_tempReal[3] = ((tg_tempReal[1] / tg_tempReal[0]) x 128.00)
Set tg_tempReal[4] = ((tg_tempReal[2] / tg_tempReal[0]) x 128.00)[/COLOR]
It stops at the red ones. If I disable both, trigger finishes. If one (or both) is enabled, it aborts exactly at that point (not sure if it processes or doesn't processes the function).

I've never had problems with triggers stopping on meh. :'( Especially when setting real values? >_>
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top