WML for beginners issue I had

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Lordlewis
Posts: 248
Joined: July 20th, 2016, 11:15 am
Location: All around, every where. All in one place yet I'm there.-Lordlewis

WML for beginners issue I had

Post by Lordlewis » December 16th, 2017, 2:24 am

When I did the WML for beginners there was something wrong, not with the website or anything. If I do everything it says up until chapter 5 and then launch Battle for Wesnoth 1.13.8 it just starts to load and then crashes. I don't know if it is with my computer or with the WML stuff I just did. Please help me out with this.
Gold is great!
Swat them bugs!

User avatar
Ravana
Moderator
Posts: 1746
Joined: January 29th, 2012, 12:49 am
Location: Estonia

Re: WML for beginners issue I had

Post by Ravana » December 16th, 2017, 3:06 am

Last two lines of console output usually have crash message.

User avatar
Lordlewis
Posts: 248
Joined: July 20th, 2016, 11:15 am
Location: All around, every where. All in one place yet I'm there.-Lordlewis

Re: WML for beginners issue I had

Post by Lordlewis » December 16th, 2017, 3:44 am

So what do I do?
Gold is great!
Swat them bugs!

Samonella
Posts: 318
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: WML for beginners issue I had

Post by Samonella » December 16th, 2017, 4:26 am

In your userdata folder there should be a logs folder. Right after making the game crash, open the most recent file in there, and hopefully its last few lines will have helpful information. :)
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Vengeance of a Drake: an RPG

User avatar
beetlenaut
Developer
Posts: 2174
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: WML for beginners issue I had

Post by beetlenaut » December 16th, 2017, 7:14 am

You most likely have an error in your WML, but WML errors are not supposed to crash Wesnoth, so you might have found a bug. However, a lot of bugs have been fixed since version 1.13.8, so you should try using 1.13.10 first. If it still crashes, then use the console.

"Running from the console" means typing wesnoth at a text-only command prompt. Wesnoth will run normally, but the text window will display messages about what it is doing and any errors it encounters. On Windows, you can look ford "Command Prompt" in the menus or enter "cmd.exe" in the run window. On MacOS, there is "Terminal" in the Applications/Utilities folder. On Linux, the terminal program you get by default depends on your distribution, but it's guaranteed to be in the menu. If you want more help with this, you'll have to tell us what system you are using.
Campaigns: Dead Water
The Founding of Borstep
Secrets of the Ancients

User avatar
Pentarctagon
Forum Administrator
Posts: 3418
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: WML for beginners issue I had

Post by Pentarctagon » December 16th, 2017, 7:22 am

99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

User avatar
Lordlewis
Posts: 248
Joined: July 20th, 2016, 11:15 am
Location: All around, every where. All in one place yet I'm there.-Lordlewis

Re: WML for beginners issue I had

Post by Lordlewis » December 16th, 2017, 8:08 am

Okay I found the crash log, it came up with...
Spoiler:
I was trying to make a campaign and if I put the campaign files into the add-ons file and open Wesnoth, it loads for about 3 seconds and when it comes to "loading units" it just crashes.
Gold is great!
Swat them bugs!

User avatar
beetlenaut
Developer
Posts: 2174
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: WML for beginners issue I had

Post by beetlenaut » December 16th, 2017, 9:00 am

That's not a very helpful error message. :annoyed:

Does the same thing happen in 1.13.10? Before trying to track the problem down more, let's make sure it isn't already fixed.
Campaigns: Dead Water
The Founding of Borstep
Secrets of the Ancients

User avatar
Lordlewis
Posts: 248
Joined: July 20th, 2016, 11:15 am
Location: All around, every where. All in one place yet I'm there.-Lordlewis

Re: WML for beginners issue I had

Post by Lordlewis » December 16th, 2017, 10:25 am

1.13.10 crashes at the same moment as when it crashes on 1.13.8, so I don't think it's fixed yet. Here is the file of the campaign that I've made so far just in case it's in the file and I've done something wrong.
Attachments
hunted_outlaws.zip
(3.09 KiB) Downloaded 17 times
Gold is great!
Swat them bugs!

User avatar
beetlenaut
Developer
Posts: 2174
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: WML for beginners issue I had

Post by beetlenaut » December 16th, 2017, 11:00 am

You are using fancy quotes which are not the same thing as regular ones. That's what is causing the crash. You need to turn off that feature in your editor or use a different program. If you don't know what to use, a lot of programmers recommend notepad++ for Windows.

You have some other errors too. For example, in _main.cfg you are missing an ending quote on the name and you have unfinished lines for icon= and image=.

Also, if you want anyone else to read your code, you will have to indent it. (It also helps you avoid mistakes.) If you're not sure what that means, here's a random chunk of code to show you what it should look like:
code:
Campaigns: Dead Water
The Founding of Borstep
Secrets of the Ancients

User avatar
Lordlewis
Posts: 248
Joined: July 20th, 2016, 11:15 am
Location: All around, every where. All in one place yet I'm there.-Lordlewis

Re: WML for beginners issue I had

Post by Lordlewis » December 16th, 2017, 7:57 pm

*Face palm* can you tell that I'm new to the making a campaign? Yeah I think I may have to double check next time... Thanks for clearing it up for me beetlenaut.
Gold is great!
Swat them bugs!

Post Reply