Infinite loop problem

If you connect a Once to cause something to happen to Global (example: setting the global number on start using once) will not allow you to play the game until it is removed and it will crash the site both in editing and playing.

1 Like

I don’t think this is a bug. I think you just created an infinite loop, it’s a common error


I don’t really think that is the case

I actually do. Link the game

When a value is set in a Global it outputs for every global of that type.

It was a user error, not a flowlab bug.

You can test this by putting 2 coins in the test level and collecting them or setting the coins to 4 in that level
The error is from the “death” object in the UI.

The problem is this code. The global isn’t even inportant, it’s just what the global is activating.

If we condense this to the actual loop this is the problem.
Screenshot 2023-03-25 3.03.54 PM

What happens is you get 4.
Then you do 4+4
Then the filter checks if it’s equal to or greater than 8
It will pass and raise the value by 2 (now it’s 6)
Then it’s 4+6
it’s starting to repeat. Forever.

Thanks! the only problem would be the fact that there is no subtracting method tho.

1 Like

Yeah, the problem is that this loop happens forever with nothing stopping it.

You have to input a negative value into the + input to subtract.

1 Like