Jump to content
Castus

Can't create Scenario. Unhandled Exception.

Recommended Posts

Posted (edited)

The scenarios I create suffer from "Unhandled Exception" errors, which crash the game. I can very easily reproduce the problem and I was wondering if someone could tell me the reason and how to avoid it.

 

I create a new scenario in the the standard editor from Spiderweb Software. I enter a name, description, set "Start with surface terrain", leave the outdoor size at 1x1, and set "Include starter town". Then without changing anything I copy the scenario into the BoA scenario directory and start the game. I enter the scenario and leave the starter town. Then I rest, which immediately crashes the game with an "Unhandled Exception" error.

 

I don't know what I should do differently. I'm pretty much following the documentation here.

 

Any tips would be helpful.

Edited by Castus

Share this post


Link to post
Share on other sites

These usually come from a call affecting something that doesn't exist or is out of range. For example, if you have a creature numbered 6 and use set_character_facing(6,8), you'll get an Unhandled Exception because 8 is out of range — that parameter is only supposed to run from 0 to 7. If you don't have a creature numbered 6, and you use erase_char(6), you'll get an Unhandled Exception because you're trying to erase a character that doesn't exist.

 

But, for reasons I don't really understand, other things also cause Unhandled Exceptions. They occur only on Windows and I use a Mac, so I've never really had much luck tracking down the other causes.

Share this post


Link to post
Share on other sites

Thank you for the reply, Kelandon.

 

If I had written even a single line of script for this scenario, I would have rated the chance of its being my mistake very high. But it happens even with the most bare-bones scenario. I'm really just following the tutorial in the guide, not adding anything after creating the scenario. If it happened when you just do the tutorial, tons of other people would have to encounter the problem. Perhaps someone who creates scenarios on Windows knows how to solve it.

Share this post


Link to post
Share on other sites

Ok. This is weird. A while ago I could reliably reproduce it. It would happen every time. But now it's gone …

 

Strange. Maybe I can figure out what's causing it next time it happens.

Share this post


Link to post
Share on other sites
2 hours ago, Castus said:

Ok. This is weird. A while ago I could reliably reproduce it. It would happen every time. But now it's gone …

 

Strange. Maybe I can figure out what's causing it next time it happens.

Yes, that appears to be what happens with the other mysterious causes of Unhandled Exceptions: they come and go for no obvious reason. Coupled with the fact that I can't reproduce them, you can see why I haven't been able to track down some of them.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×