Freedom discovered: When you delete a map being used as layers, and then go the the map with screens calling for those layers on a map that no longer exists, zquest crashes.
B12: Deleting a map used by a layer.
Hm. Bit of trouble here.
The solution to this problem is this: when the map count is decreased, check each screen on each remaining map to see if it uses a map that's being deleted, and set that layer's map to 0 if so.
That isn't all that hard. I've already done it, in fact. However, this process may involve changing the layers on screen 84-87, which causes ZQuest to crash. Thus, fixing this problem actually makes things worse. I could just skip those screens, but it would obviously be preferable to fix them.
I'll leave fix in the code, but comment it out for the time being. When those higher-numbered screens are fixed, this will be, too.
I've encountered variations of this problem in just about every version of ZQuest that uses layers. I assume it's caused when ZQuest attempts to use a null value as a numeric variable. A safeguard is really needed to prevent ZQuest from trying to do this.
Turns out the problem wasn't what I thought it was (which is good, 'cause I couldn't understand why it would be). So this should be fixed now. It'll also warn you if reducing the map count would delete maps being used for layers.
I'm pretty sure it's all right, but check and make certain I didn't get the numbers a bit off.
While I was at it, I added a check for invalid layers which should stop ZQuest from crashing on such screens. It will now set those layers to use map 0 instead.
That means you should be able to edit screen 87 safely now (though it still doesn't work right), since the problem with it seems to ha be that one of its layers uses map 50. That fact also means you'll get a warning about reducing the map count when you really shouldn't, but only once.
(Edit: Yeah, I screwed up the message. I'll fix it soon.)
This is no longer a problem in the 536 so I'm moving it to exterminated bugs
YEAH that was getting on my nerves but you got a bulid that has a fixed update oh joy!!!!