Error with [/unit]

The place to post your WML questions and answers.

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

Error with [/unit]

Post by OphiliaJohnson »

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 230 times
Last edited by OphiliaJohnson on May 30th, 2018, 7:30 am, edited 1 time in total.
User avatar
Pentarctagon
Project Manager
Posts: 5521
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Error with [/unit]

Post by Pentarctagon »

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: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Error with [/unit]

Post by zookeeper »

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 »

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
Project Manager
Posts: 5521
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Error with [/unit]

Post by Pentarctagon »

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: 238
Joined: April 29th, 2017, 11:37 pm

Re: Error with [/unit]

Post by Choicerer »

I've already solved this one for Ophilia. The problem was multiple macros on the same line.
enclave
Posts: 936
Joined: December 15th, 2007, 8:52 am

Re: Error with [/unit]

Post by enclave »

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: 238
Joined: April 29th, 2017, 11:37 pm

Re: Error with [/unit]

Post by Choicerer »

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.
Post Reply