Jump to content

Can't create Scenario. Unhandled Exception.


Castus

Recommended Posts

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
Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...