Function that returns the next available map number. The function tries to get the highest used map number and add one to that. When the highest possible map number has been used, the function cycles the used map numbers until it can find a map number that is not yet used.
Note: This function may slow your script down considerable when you use it in a large project.
var mapnumber = getNextMapNumber();
This function has no parameters.
|number||The next available map number|
|null||There are no more map numbers available for this project. You've got a VERY large project|