Error with [/unit]

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
OphiliaJohnson
Posts: 3
Joined: May 3rd, 2018, 4:02 pm

Error with [/unit]

Post by OphiliaJohnson » May 30th, 2018, 6:06 am

So, i was taught the basics on how to do unit spawn events, but ran into a wall, i keep getting an error with [/unit] and can't quite make heads or tails of what is wrong when it all worked fine before i added turns to the [event]

The following add-on had errors and could not be loaded:
C:\Users\Matt H\Documents\My Games\Wesnoth1.14/data/add-ons/Ophilia_ANL/_main.cfg

Please report this to the author or maintainer of this add-on.

Details:

Found invalid closing tag [/unit] for tag [event]
opened at ~add-ons/Ophilia_ANL/scenarios/ANL_Test_1.cfg:171
included from ~add-ons/Ophilia_ANL/_main.cfg:5
closed at ~add-ons/Ophilia_ANL/scenarios/ANL_Test_1.cfg:143
included from ~add-ons/Ophilia_ANL/_main.cfg:5
included from ~add-ons/Ophilia_ANL/scenarios/ANL_Test_1.cfg:172
included from ~add-ons/Ophilia_ANL/_main.cfg:5

I really didn't want to post here cause i know my luck it is probably a real simple and idiotic thing i missed or too ignorant to know about.
Attachments
ANL_Test_1.cfg
(13.67 KiB) Downloaded 10 times
Last edited by OphiliaJohnson on May 30th, 2018, 7:30 am, edited 1 time in total.

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

Re: Error with [/unit]

Post by Pentarctagon » May 30th, 2018, 6:24 am

Is this the full file? Because there's no [unit] or [event] tags in there, nor even a [multiplayer] or [scenario].
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
zookeeper
WML Wizard
Posts: 9712
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Error with [/unit]

Post by zookeeper » May 30th, 2018, 7:29 am

What you have there needs to go inside a [multiplayer] tag.

OphiliaJohnson
Posts: 3
Joined: May 3rd, 2018, 4:02 pm

Re: Error with [/unit]

Post by OphiliaJohnson » May 30th, 2018, 7:34 am

Well that was weird, when i uploaded it the code was writen some how when i uploaded it went to the wrong CFG... the correct one is there...not sure what happened...

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

Re: Error with [/unit]

Post by Pentarctagon » May 30th, 2018, 7:39 am

You have no closing [/event] tags.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

Choicerer
Posts: 214
Joined: April 29th, 2017, 11:37 pm

Re: Error with [/unit]

Post by Choicerer » May 30th, 2018, 8:06 am

I've already solved this one for Ophilia. The problem was multiple macros on the same line.
Creator of Choicerer's Map Randomizer - http://bit.ly/2GNcnuv Better Odds - http://bit.ly/2HP41ln
The Better Names Mod - http://bit.ly/2ICIGwz Architecture Mod - http://bit.ly/2JjbNsN
Curse of Satan Claus - http://bit.ly/2pq6MSg The Trolling Mod - http://bit.ly/2GbpAiO
and the Mushroom Isar.

enclave
Posts: 773
Joined: December 15th, 2007, 8:52 am

Re: Error with [/unit]

Post by enclave » May 30th, 2018, 9:50 am

OphiliaJohnson wrote:
May 30th, 2018, 6:06 am
C:\Users\Matt H\Documents\My Games\Wesnoth1.14/data/add-ons/Ophilia_ANL/_main.cfg
I'm concerned about these things C:\Users\Matt H\Documents\My Games\Wesnoth1.14/data/add-ons/Ophilia_ANL/_main.cfg
(it depends where exactly this path comes from, so not sure why they pointing in different directions, but when such happens with images, they won't show for mac/linux users. again, depends on which context u copied this from..)

Choicerer
Posts: 214
Joined: April 29th, 2017, 11:37 pm

Re: Error with [/unit]

Post by Choicerer » May 30th, 2018, 1:17 pm

Good point. I've been helping Matt with his mod, but he is on Windows, while I'm on linux. Hence the different slashes in one file path. Yes, it's better to keep them uniform, in this case Windows style, but this seems to be parsed okay, anyway.
Creator of Choicerer's Map Randomizer - http://bit.ly/2GNcnuv Better Odds - http://bit.ly/2HP41ln
The Better Names Mod - http://bit.ly/2ICIGwz Architecture Mod - http://bit.ly/2JjbNsN
Curse of Satan Claus - http://bit.ly/2pq6MSg The Trolling Mod - http://bit.ly/2GbpAiO
and the Mushroom Isar.

Post Reply