Help needed; Can't find an error
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.
-
- Posts: 14
- Joined: October 10th, 2005, 5:15 am
- Location: Eugene, OR
- Contact:
Help needed; Can't find an error
I am making a scenario to test out my skills in WML and have necountered an error I haven't been able to fix. Whenever I try to run the scenario I get a warning that I have an unclosed tag 'move_unit_fake' I have counted all my tags and they all close. I have added in an additional closing tag for that tag. I have even tried removing all tags of that type from my scenario and still I get the error. Can anyone help? I'll post my code here: (BTW I made the caravan unit incase someone is confused about what those are)
[scenario]
id=Caravan
name= _"Caravan"
map_data="{C:\Program Files\Wesnoth\userdata\scenarios\Bandit_Campaign\blarg}"
turn=22
next_scenario=A_Long_Road
{DAWN}
{MORNING}
{AFTERNOON}
{DUSK}
{FIRST_WATCH}
{SECOND_WATCH}
music="wesnoth-1.ogg"
[event]
name=prestart
[objectives]
side=1
[objective]
description= _ "Bring Malin to the signpost."
condition=win
[/objective]
[objective]
description= _ "Death of Malin"
condition=lose
[/objective]
[objective]
description= _ "Death of Dret"
condition=lose
[/objective]
[/objectives]
[/event]
[event]
name=start
[move_unit_fake]
type=Caravan
x=50,49,48
y=52,52,51
[/move_unit_fake]
[unit]
type=Caravan
description=Caravan
x,y=48,51
[/unit]
[move_unit_fake]
type=horseman
x=50,49,48,47
y=53,53,52,52
[/move_unit_fake]
[unit]
type=horseman
description="Galamdow"
x,y=47,52
[/unit]
[move_unit_fake]
type=horseman
x=50,49,48
y=51,51,50
[/move_unit_fake]
[unit]
type=horseman
description="Norim"
x,y=48,50
[/unit]
[move_unit_fake]
type=horseman
x=50,49
y=51,51
[/move_unit_fake]
[unit]
type=horseman
x=49
y=51
description="Blain"
[/unit]
[move_unit_fake]
type=horseman
x=50,49,48
y=53,53,52
[/move_unit_fake]
[unit]
type=horseman
x,y=48,52
description="Halden"
[/unit]
[message]
description=Dret
profile=Dret
message="The caravan has arrived, just as promised. They have a small guard, but it's nothing we can't deal with!"
[/message]
[message]
description=Lent
profile=Lent
message="The guard may not be a problem, but our scouts have spotted a contingent of the Wesnothian Army heading south from Carcyn"
[/message]
[message]
description=Malin
profile=Malin
message="This is getting worse by the minute! We could still try to capture the caravan, but we will have to escape into the old caves to avoid capture."
[message]
description=Glamdin
profile=images/human-lieutenant
message"There they are! Get them!"
[/message]
[message]
description="Halden"
profile=horseman.png
message="Its an ambush!! Ahhh!!"
[/message]
[unit]
type=spearmen
x,y=44,50
[/unit]
[unit]
type=spearmen
x,y=34,42
[/unit]
[unit]
type=spearmen
x,y=36,36
[/unit]
[unit]
type=spearmen
x,y=37,29
[/unit]
[unit]
type=spearmen
x,y=33,28
[/unit]
[unit]
type=spearmen
x,y=33,21
[/unit]
[unit]
type=spearmen
x,y=20,15
[/unit]
[unit]
type=spearmen
x,y=18,9
[/unit]
[/event]
[event]
name=die
[filter]
description="Malin"
[/filter]
[message]
description="Malin"
message="Arrgh!!"
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
next_scenario=A_Narrow_Escape
[side]
type=Theif
description=Malin
unrenamable="yes"
canrecruit=1
recruit=Theif, Thug, Poacher, Footpad
upkeep=free
side=1
controller=human
[unit]
type=Poacher
description=Dret
upkeep=loyal
unrenamable="yes"
side=1
x,y=10,38
[/unit]
[unit]
type=Footpad
description=Lent
upkeep=loyal
side=1
x,y=18,34
[/unit]
[/side]
#define AISTUFF
[ai]
recruitment_pattern=scout,scout,fighter,archer
grouping=no
aggression=0.3
[/ai]
[side]
type=Lieutenant
description=Glamdin
side=2
canrecruit=1
recruit= spearmen, bowman, horseman, heavy infantry
upkeep=free
{GOLD 100}
{INCOME 10}
{AISTUFF}
[/side]
[/scenario]
[scenario]
id=Caravan
name= _"Caravan"
map_data="{C:\Program Files\Wesnoth\userdata\scenarios\Bandit_Campaign\blarg}"
turn=22
next_scenario=A_Long_Road
{DAWN}
{MORNING}
{AFTERNOON}
{DUSK}
{FIRST_WATCH}
{SECOND_WATCH}
music="wesnoth-1.ogg"
[event]
name=prestart
[objectives]
side=1
[objective]
description= _ "Bring Malin to the signpost."
condition=win
[/objective]
[objective]
description= _ "Death of Malin"
condition=lose
[/objective]
[objective]
description= _ "Death of Dret"
condition=lose
[/objective]
[/objectives]
[/event]
[event]
name=start
[move_unit_fake]
type=Caravan
x=50,49,48
y=52,52,51
[/move_unit_fake]
[unit]
type=Caravan
description=Caravan
x,y=48,51
[/unit]
[move_unit_fake]
type=horseman
x=50,49,48,47
y=53,53,52,52
[/move_unit_fake]
[unit]
type=horseman
description="Galamdow"
x,y=47,52
[/unit]
[move_unit_fake]
type=horseman
x=50,49,48
y=51,51,50
[/move_unit_fake]
[unit]
type=horseman
description="Norim"
x,y=48,50
[/unit]
[move_unit_fake]
type=horseman
x=50,49
y=51,51
[/move_unit_fake]
[unit]
type=horseman
x=49
y=51
description="Blain"
[/unit]
[move_unit_fake]
type=horseman
x=50,49,48
y=53,53,52
[/move_unit_fake]
[unit]
type=horseman
x,y=48,52
description="Halden"
[/unit]
[message]
description=Dret
profile=Dret
message="The caravan has arrived, just as promised. They have a small guard, but it's nothing we can't deal with!"
[/message]
[message]
description=Lent
profile=Lent
message="The guard may not be a problem, but our scouts have spotted a contingent of the Wesnothian Army heading south from Carcyn"
[/message]
[message]
description=Malin
profile=Malin
message="This is getting worse by the minute! We could still try to capture the caravan, but we will have to escape into the old caves to avoid capture."
[message]
description=Glamdin
profile=images/human-lieutenant
message"There they are! Get them!"
[/message]
[message]
description="Halden"
profile=horseman.png
message="Its an ambush!! Ahhh!!"
[/message]
[unit]
type=spearmen
x,y=44,50
[/unit]
[unit]
type=spearmen
x,y=34,42
[/unit]
[unit]
type=spearmen
x,y=36,36
[/unit]
[unit]
type=spearmen
x,y=37,29
[/unit]
[unit]
type=spearmen
x,y=33,28
[/unit]
[unit]
type=spearmen
x,y=33,21
[/unit]
[unit]
type=spearmen
x,y=20,15
[/unit]
[unit]
type=spearmen
x,y=18,9
[/unit]
[/event]
[event]
name=die
[filter]
description="Malin"
[/filter]
[message]
description="Malin"
message="Arrgh!!"
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
next_scenario=A_Narrow_Escape
[side]
type=Theif
description=Malin
unrenamable="yes"
canrecruit=1
recruit=Theif, Thug, Poacher, Footpad
upkeep=free
side=1
controller=human
[unit]
type=Poacher
description=Dret
upkeep=loyal
unrenamable="yes"
side=1
x,y=10,38
[/unit]
[unit]
type=Footpad
description=Lent
upkeep=loyal
side=1
x,y=18,34
[/unit]
[/side]
#define AISTUFF
[ai]
recruitment_pattern=scout,scout,fighter,archer
grouping=no
aggression=0.3
[/ai]
[side]
type=Lieutenant
description=Glamdin
side=2
canrecruit=1
recruit= spearmen, bowman, horseman, heavy infantry
upkeep=free
{GOLD 100}
{INCOME 10}
{AISTUFF}
[/side]
[/scenario]
Heat, pressure and time; the three things that make a diamond... also make a waffle.
Re: Help needed; Can't find an error
You have quite a number of typos.
The key to set the number of turns is turns, not turn.
The unit type is "Horseman", not "horseman". I'm not actually sure if that matters, but you should use the correct capitalization for clarity even if it doesn't.
profile=Dret doesn't make sense. The profile key wants an image file, so it should point to the actual .png image of Dret (whoever that is), which should be something like portraits/Dret.png, for instance. There are similar bugs with Lent and Malin at least.
The first [message] isn't closed. The second has the profile missing the .png extension. And the path looks suspicious. Also, there's another typo, I'm sure you can find it if you try.
There's no unit type "spearmen", unless you've created one. Be exact.
"Theif"?
You start to define a macro called AISTUFF, but you never close the definition, so everything after #define AISTUFF is considered as part of the said macro.
All of these are typos or misspellings. Be more exact and careful in the future, the game doesn't do typechecking for you.
Code: Select all
[scenario]
id=Caravan
name= _"Caravan"
map_data="{C:\Program Files\Wesnoth\userdata\scenarios\Bandit_Campaign\blarg}"
turn=22
Code: Select all
[move_unit_fake]
type=horseman
x=50,49,48,47
y=53,53,52,52
[/move_unit_fake]
Code: Select all
[message]
description=Dret
profile=Dret
message="The caravan has arrived, just as promised. They have a small guard, but it's nothing we can't deal with!"
[/message]
Code: Select all
[message]
description=Malin
profile=Malin
message="This is getting worse by the minute! We could still try to capture the caravan, but we will have to escape into the old caves to avoid capture."
[message]
description=Glamdin
profile=images/human-lieutenant
message"There they are! Get them!"
[/message]
Code: Select all
[unit]
type=spearmen
x,y=44,50
[/unit]
Code: Select all
[side]
type=Theif
description=Malin
unrenamable="yes"
canrecruit=1
recruit=Theif, Thug, Poacher, Footpad
Code: Select all
#define AISTUFF
[ai]
recruitment_pattern=scout,scout,fighter,archer
grouping=no
aggression=0.3
[/ai]
[side]
type=Lieutenant
description=Glamdin
side=2
canrecruit=1
recruit= spearmen, bowman, horseman, heavy infantry
upkeep=free
{GOLD 100}
{INCOME 10}
{AISTUFF}
[/side]
[/scenario]
All of these are typos or misspellings. Be more exact and careful in the future, the game doesn't do typechecking for you.