Is it safe to use ExitOnError(false) with Removelayer()?
Posted: Sun Apr 28, 2013 11:14 am
When level ends, or I move from game to title menu or whatever, I am in need of removing lot of layers.
Simplest way would be to use something like:
Point is that I know some of the layers dont exist anymore, and hence I would be turning Exit on Error off, or otherwise program would exit.
But is this safe way to do it? or might this cause some trouble to be using ExitOnError(false) in connection with removelayer when many of the layers to be removed wont be existing?
Simplest way would be to use something like:
Code: Select all
ExitOnError(false)
for n = 1 to 100
removelayer("enemy"..n)
next n
ExitOnError(true)But is this safe way to do it? or might this cause some trouble to be using ExitOnError(false) in connection with removelayer when many of the layers to be removed wont be existing?