How to solve WML errors
Moderator: Forum Moderators
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.
Re: How to easily debug WML
So a colorful stderr.txt? So my method would still work. My method just shows the best way to solve individual errors, not how to find them. Now to find them, that 1.9 highlighting thing would help some.
EDIT: The in-game error log only shows one error at a time, while the stderr shows a bunch of them. Also, the in-game error log has a terrible habit of giving irrelevant errors. At least 1 out of 2 errors I get from there are irrelevant.
EDIT: The in-game error log only shows one error at a time, while the stderr shows a bunch of them. Also, the in-game error log has a terrible habit of giving irrelevant errors. At least 1 out of 2 errors I get from there are irrelevant.
Re: How to easily debug WML
Not exactly, it just shows the mistakes, no yellow highlighting. Just text pointing where the mistake is.bigkahuna wrote:So a colorful stderr.txt? So my method would still work. My method just shows the best way to solve individual errors, not how to find them. Now to find them, that 1.9 highlighting thing would help some.
Formerly known as the creator of Era of Chaos and maintainer of The Aragwaithi and the Era of Myths.
Re: How to easily debug WML
Well that helps. Looks like they've cleaned up the error messages. I'll switch over to 1.9 once my favorite add-ons get ported 

Re: How to solve WML errors
Use wmllint tool (sudo apt-get install wesnoth-1.12-tools) to check code. It built into graphical wesnoth/data/tools/GUI.pyw tools that come with Wesnoth sources.
Re:
total noob hereFinisterrex wrote: ↑June 7th, 2007, 11:56 am Yesterday it happens to me xD
i started reading all lines, but then i cut the WML as u said, and at the final i get the error... an "asdasdasd" typed by error lol.
doin a lot with ai lately
(for some stuff its a mess)
but wouldn't it be easy today to first copy&paste your whole cfg to a ai and say: "Not working. Find mistake."
Afaik ai's hallucinate a lot of stuff but a erroneous "asdasadas" in a bunch of code it finds in seconds ...
=)
Re: How to solve WML errors
You should use schema validation, not hallucinations for that. https://wiki.wesnoth.org/SchemaWML
Re: Re:
I would not expect an LLM-based chatbot to actually work very well with WML. The problem is that LLMs work best when they are trained on large amounts of training data - for example, with a popular programming language like C++, there are literally billions of lines of code that have been written in that language and can be used for training purposes. But with WML, there are only about a dozen mainline campaigns and a few hundred add-ons on the add-on server, and that's it; that's all the WML code that has ever been written. Even if all of it is used for training data, that's still not very much.
You might get better results when using Lua (because Lua is a popular, widely used programming language).
Re: Re:
i just tested grok (twitter ai)gnombat wrote: ↑April 18th, 2025, 4:09 am I would not expect an LLM-based chatbot to actually work very well with WML. The problem is that LLMs work best when they are trained on large amounts of training data - for example, with a popular programming language like C++, there are literally billions of lines of code that have been written in that language and can be used for training purposes. But with WML, there are only about a dozen mainline campaigns and a few hundred add-ons on the add-on server, and that's it; that's all the WML code that has ever been written. Even if all of it is used for training data, that's still not very much.
gave it my scenario script and randomly put in some asdfasdasd
https://x.com/i/grok/share/v1pfJsBmqymUeXAGTP89NGWJA
found it instantly
it was at an ez place and not sayin untrained chatbots are much use in coding in general
but for simple stuff like this?
Re: How to solve WML errors
totally YMMV
i used grok a lot to learn the Wesnoth map editor ("Where is..." "How do i...") and that worked great
for example: How do I make a map description that shows up in the multiplayer screen and not just on the addon server
and it told me in so many words "do that in the file dude doh! under description="
for coding so lala bc it tends to make stuff up or not understand
i was told there is another wml language out there so there is mix ups
but i fed it some basic wml pages from wesnoth.org and there are some results but more like a extended search machine
like "is there a tag that does XYZ? look here www... and on all linked pages"
but it totally depends on how you phrase the question and can go 100% wrong and lead you astray or just try sell you bs with the utmost conviction
i used grok a lot to learn the Wesnoth map editor ("Where is..." "How do i...") and that worked great
for example: How do I make a map description that shows up in the multiplayer screen and not just on the addon server
and it told me in so many words "do that in the file dude doh! under description="
for coding so lala bc it tends to make stuff up or not understand
i was told there is another wml language out there so there is mix ups
but i fed it some basic wml pages from wesnoth.org and there are some results but more like a extended search machine
like "is there a tag that does XYZ? look here www... and on all linked pages"
but it totally depends on how you phrase the question and can go 100% wrong and lead you astray or just try sell you bs with the utmost conviction