Difference between revisions of "DebuggingCampaigns"
From The Battle for Wesnoth Wiki
(→See Also:) |
|||
Line 1: | Line 1: | ||
"Debugging" means to fix by removing errors. Here are some ideas to help you when you are building a campaign and need to fix it. | "Debugging" means to fix by removing errors. Here are some ideas to help you when you are building a campaign and need to fix it. | ||
− | |||
== Things to check when your scenario doesn't load == | == Things to check when your scenario doesn't load == | ||
Line 8: | Line 7: | ||
*Is the ".cfg" extension appended to the script filename? | *Is the ".cfg" extension appended to the script filename? | ||
− | *Is the script in the right location (usually | + | *Is the script in the right location (usually ~add-ons/YOUR_ADDON/scenarios) |
*Is it really a scenario load problem? Maybe the main.cfg file isn't being loaded correctly. | *Is it really a scenario load problem? Maybe the main.cfg file isn't being loaded correctly. | ||
Line 14: | Line 13: | ||
*Are all the linking tags spelled correctly? ("first_scenario=???", "next_scenario=???", "id=???") | *Are all the linking tags spelled correctly? ("first_scenario=???", "next_scenario=???", "id=???") | ||
− | *If you're using the template, did you remember to change | + | *If you're using the template, did you remember to change all include and file paths to match your setup? |
− | *Is | + | *Is another downloaded add-on breaking your version of the game or conflicting with your content? |
*Do you have read permissions on your scripts? | *Do you have read permissions on your scripts? | ||
+ | |||
+ | == Other tips == | ||
+ | |||
+ | A recommended approach by zookeeper is to remove half your code, and try to load your add-on. If the error is gone, you know it's in the half you removed. Take whichever half has the error, and keep removing half of what remains until you isolate the error. | ||
Revision as of 06:59, 18 March 2014
"Debugging" means to fix by removing errors. Here are some ideas to help you when you are building a campaign and need to fix it.
Things to check when your scenario doesn't load
- Do the id tags match exactly? Does the id in the caller script have the same case (lowercase/uppercase) as the scenario's id?
- Is the ".cfg" extension appended to the script filename?
- Is the script in the right location (usually ~add-ons/YOUR_ADDON/scenarios)
- Is it really a scenario load problem? Maybe the main.cfg file isn't being loaded correctly.
- Are all the linking tags spelled correctly? ("first_scenario=???", "next_scenario=???", "id=???")
- If you're using the template, did you remember to change all include and file paths to match your setup?
- Is another downloaded add-on breaking your version of the game or conflicting with your content?
- Do you have read permissions on your scripts?
Other tips
A recommended approach by zookeeper is to remove half your code, and try to load your add-on. If the error is gone, you know it's in the half you removed. Take whichever half has the error, and keep removing half of what remains until you isolate the error.