Failed to load scenario, syntax 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: 21
- Joined: November 15th, 2019, 8:54 pm
Failed to load scenario, syntax error ?
Hi, i'm new to both the forum and WML. I was trying to follow a begginner's guide on how to make a campaign with a friend. Everythign went well, we followed instructions at the letter and when it was finally time to play what we made we both got an error saying "Failed to load the scenario" i assume it is linked to the main.cfg file but i truly don't know. I read a few other posts on the forum saying to put the [scenario] in the main.cgf file but i have no idea how ... anyways, can someone help ? thanks in advance
here is my main.cfg
and my scenario :
here is my main.cfg
Code: Select all
[textdomain]
name="wesnoth-simple_start"
path="data/add-ons/simple_start/translations"
[/textdomain]
#textdomain wesnoth-simple_start
[campaign]
#wesnoth-simple_start
id=simple_start
name= _ "A simple start"
abbrev= _ "aSS"
icon="units/human-magi/red-mage-attack-magic-2.png~RC(magenta>red)"
image="data/add-ons/simple_start/images/icon-game.png"
first_scenario=a_simple_start
description= _ "Clean out the mountains of the undead lich"
difficulties=EASY
difficulty_descriptions={MENU_IMG_TXT2 units/undead/shadow-s-attack-4.png _"Easy" _""}
[/campaign]
#ifdef SIMPLE_START
[binary path]
path=data/add-ons/simple_start
[/binary path]
{~add-ons/simple_start/macros}
{~add-ons/simple_start/utils}
{~add-ons/simple_start/scenarios}
#endif
Code: Select all
#textdomain wesnoth-simple_start
[scecnario]
id=a_simple_start
next_scenario=null
name= _ "Fiat Lux"
map_data="{~add-ons/simple_start/maps/simple_start_map.map}"
turns=30
[side]
side=1
controller=human
team_name="good"
user_team_name= _ "Inquisition"
id="MyLeader"
name= _ "Lydéric"
type="Lieutenant"
unrenameable=yes
canrecrcuit=yes
recruit="Horseman, Spearman, Bowman"
gold=100
[/side]
[side]
side=2
controller=ai
team_name="bad"
user_team_name= _ "Morts-vivants"
id="EnnemyLeader"
name= _ "Kalshar"
type="Lich"
unrenameable=yes
canrecruit=yes
recruit="Skeleton Archer, Skeleton, Ghost"
gold=100
[/side]
[event]
name=start
[message]
speaker=MyLeader
message= _ "Enfin je vous trouves, ville créature ! Préparez-vous à mourir "
[/message]
[message]
speaker=EnnemyLeader
message= _ "Tu es bien présomptueux, mortel..."
[/message]
[objectives]
[objective]
description= _ "Tuez Kalshar"
condition=win
[/objective]
[objective]
description= _ "Mort de Lydéric"
condition=lose
[/objective]
[objective]
description= _ "Limite de tours atteinte"
condition=lose
[/objective]
[/objectives]
[/event]
[event]
name="last breath"
[filter]
id=MyLeader
[/filter]
[message]
speaker=MyLeader
message= _ "Alors c'est comme ça que... je... finis... *soupir*"
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=die
[filter]
id=EnnemyLeader
[/filter]
[filter_second]
side=1
[/filter_second]
[message]
speaker=second_unit
message= _ "Il est... mort ?"
[/message]
[message]
speaker=MyLeader
message= _ "Il est mort depuis longtemps mais au moins il ne causera plus de mal aux innocents. Puisse dieu avoir pitié de lui."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=time over
[message]
speaker=MyLeader
message= _ "Nous perdons trop d'hommes et cette bataille dure depuis des jours, replions-nous !"
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[/scenario]
- Pentarctagon
- Project Manager
- Posts: 5573
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Failed to load scenario, syntax error ?
Your opening [scenario] tag is misspelled:
[scecnario]
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: Failed to load scenario, syntax error ?
Hi,
make sure your main file is _main.cfg
other than the bug Pentarctagon mentioned, you also have the following problems.
[binary path] and [/binary path] should be [binary_path] [/binary_path]
add the line define=SIMPLE_START to [campaign]
make sure your main file is _main.cfg
other than the bug Pentarctagon mentioned, you also have the following problems.
[binary path] and [/binary path] should be [binary_path] [/binary_path]
add the line define=SIMPLE_START to [campaign]
-
- Posts: 21
- Joined: November 15th, 2019, 8:54 pm
Re: Failed to load scenario, syntax error ?
Thank you for pointing that out, got it working thanks to you and vghettoPentarctagon wrote: ↑August 5th, 2020, 5:01 pm Your opening [scenario] tag is misspelled:[scecnario]
-
- Posts: 21
- Joined: November 15th, 2019, 8:54 pm
Re: Failed to load scenario, syntax error ?
Thanks a lot ! it's working also would it be too much to ask what the define line means ?
Re: Failed to load scenario, syntax error ?
hmm, it means internally the string SIMPLE_START should be recognized "as defined" so #ifdef SIMPLE_START would return true and the block inside #ifdef gets parsed and executed. Without that line the block inside the ifdef would have been ignored.
I don't know if that made sense.
I don't know if that made sense.
-
- Posts: 21
- Joined: November 15th, 2019, 8:54 pm
Re: Failed to load scenario, syntax error ?
i think i got it, thanks for your time ^^vghetto wrote: ↑August 5th, 2020, 5:58 pm hmm, it means internally the string SIMPLE_START should be recognized "as defined" so #ifdef SIMPLE_START would return true and the block inside #ifdef gets parsed and executed. Without that line the block inside the ifdef would have been ignored.
I don't know if that made sense.