Nested quoted string, can someone help me ?
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
Nested quoted string, can someone help me ?
so i got this error. First thing i do is check absolutely every string of my main_cfg and my first scenario. But they all seems good...
I should precise that i started WML 2 days ago. Every piece of code worked fine until i tried to add a [story] tagset in my first scenario. However it doesn't seem to be the problem...
here is the error
Details :
Nested quoted string
at ~add-ons/simple_start/scenarios/a_simple_start.cfg:5
included from ~add-ons/simple_start/_main.cfg:35
my _main.cfg :
my first scenario (difficulty is not actually implemented yet) :
there's another scenario but its isn't linked in anyway to the error code. I'll put it just in case :
I try my best to understand everything but i never did coding before and i don't know anything :/ i'm learning tho so i hope i can get this sorted. Thanxs in advance guys.
I should precise that i started WML 2 days ago. Every piece of code worked fine until i tried to add a [story] tagset in my first scenario. However it doesn't seem to be the problem...
here is the error
Details :
Nested quoted string
at ~add-ons/simple_start/scenarios/a_simple_start.cfg:5
included from ~add-ons/simple_start/_main.cfg:35
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= _ "Lydéric, le Prologue"
abbrev= _ "LlP"
define=SIMPLE_START
icon="units/human-loyalists/lieutenant-die-1.png~RC(magenta>red)"
image="data/add-ons/simple_start/images/Lieutenant.png"
first_scenario=a_simple_start
description= _ "Suivez le lieutenant templier Lydéric dans sa quête pour tuer une liche. (2 scénarios)"
difficulties=EASY
{CAMPAIGN_DIFFICULTY EASY "units/human-peasants/peasant.png~RC(magenta>red)" ( _ "Civilian") ( _ "Beginner")}
{CAMPAIGN_DIFFICULTY NORMAL "units/human-loyalists/spearman.png~RC(magenta>red)" ( _ "Recruit") ( _ "Easy")} {DEFAULT_DIFFICULTY}
{CAMPAIGN_DIFFICULTY HARD "units/human-loyalists/javelineer.png~RC(magenta>red)" ( _ "Soldier") ( _ "Normal")}
[/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
[scenario]
[story]
[part]
background="{~add-ons/simple_start/images/wesnoth-map.png"}"
story= _ "Depuis des siècles, le rôle de l'inquisition est de purifier les terres de wesnoth des infamies qui y existe..."
[/part]
[background_layer]
image="{~add-ons/simple_start/images/wooden background.jpg}"
[/background_layer]
[part]
background="{~add-ons/simple_start/images/Lieutenant.png}"
story= _ "Ceci est la courte histoire du jeune lieutenant templier, Lydéric qui doit nettoyer une valée d'une menace mort-vivante"
[/part]
[/story]
{DEFAULT_SCHEDULE}
id=a_simple_start
next_scenario=a_simple_escape
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=250
[/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]
[message]
speaker=narrator
message= _ "La menace étant étiente, il était temps pour le lieutenant Lydéric et ses hommes de rentrer."
[/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]
Code: Select all
#textdomain wesnoth-simple_start
[scenario]
{MIDNIGHT}
id=a_simple_escape
next_scenario=null
name= _ "Le col d'outre-vent"
map_data="{~add-ons/simple_start/maps/simple_escape.map}"
turns=15
[side]
side=1
controller=human
team_name="good"
user_team_name= _ "Inquisition"
id="MyLeader"
name= _ "Lydéric"
type="Lieutenant"
recruit="Horseman, Spearman, Bowman"
gold=300
shroud=yes
[/side]
[side]
side=2
controller=ai
team_name="bad"
user_team_name= _ "Orcs"
id="OrcLeader"
name= _ "Gurush"
type="Orcish Ruler"
unrenameable=yes
canrecruit=yes
recruit="Orcish Archer,Orcish Grunt"
gold=400
[/side]
[side]
side=3
controller=ai
team_name="bad"
user_team_name= _ "Trolls"
id="TrollLeader"
name= _ "Grog"
type="Troll Hero"
unrenameable=yes
canrecruit=yes
recruit="Troll Whelp"
gold=150
[/side]
[event]
name=start
[message]
speaker=narrator
message= _ "En pleine nuit, dans leur bivouac au col d'Outre-vent, les forces de Lydéric sont révéillées par les sons lourds d'une armée en marche..."
[/message]
[message]
speaker=MyLeader
message= _ "Des orcs !"
[/message]
[message]
speaker=OrcLeader
message= _ "Les humains sont là, massacrez-les !"
[/message]
[message]
speaker=MyLeader
message= _ "Ils sont trop nombreux, vite passons le gouffre et sa barrière magique ! HARDI LES GARS!"
[/message]
[objectives]
[objective]
description= _ "Lydéric traverse le gouffre"
condition=win
[/objective]
[objective]
description= _ "Mort de lydéric"
condition=lose
[/objective]
[/objectives]
[/event]
[event]
name=sighted
first_time_only="yes"
[filter]
side=3
[/filter]
[filter_second]
side=1
[/filter_second]
[message]
speaker=second_unit
message= _ "Des trolls ! Qu'allons nous faire ??!"
[/message]
[message]
speaker=MyLeader
message= _ "Gardez votre calme soldat!, nous serons en sécurité après avoir passé le gouffre !"
[/message]
[/event]
[event]
name="last breath"
[filter]
id=MyLeader
[/filter]
[message]
speaker=MyLeader
message= _ "Traversez le gouffre sans moi, et vengez-moi..."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=25,5
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=24,4
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=24,3
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=24,2
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=25,2
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=26,1
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=27,1
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=25,6
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=26,6
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=27,6
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=28,6
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=29,6
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=30,5
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=31,5
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=31.4
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=30,3
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=29,3
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=27,2
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=28,2
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=26,6
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=25,3
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=26,2
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=25,4
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=26,3
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=27,3
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=26,4
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=27,4
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=28,3
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=27,5
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=28,4
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=29,4
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=28,5
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=29,5
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=MyLeader
x,y=30,4
[/filter]
[message]
speaker=MyLeader
message= _ "Nous avons réussi! La mort de nos camarades n'aura pas été vaine..."
[/message]
[message]
speaker=narrator
message= _ "Et ainsi, Lydéric finit sa mission et rentra rendre son rapport à l'inquisition..."
[/message]
[endlevel]
result=victory
[/endlevel]
[/event]
[/scenario]
Re: Nested quoted string, can someone help me ?
Looks like you have an extra double-quote in the line
background="{~add-ons/simple_start/images/wesnoth-map.png"}"
.- MoonyDragon
- Posts: 149
- Joined: November 29th, 2017, 5:46 pm
Re: Nested quoted string, can someone help me ?
What Wesnoth tells you is that you have a " too many in the 5th line of your
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
Such errors are glaringly obvious if you use a syntax highlighter. You can find SH's for WML here.
a_simple_start.cfg
file. If you take a closer look at that line, you will see the error pretty quickly:background="{~add-ons/simple_start/images/wesnoth-map.png"}"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
Such errors are glaringly obvious if you use a syntax highlighter. You can find SH's for WML here.
Default L0 Era - Level 1 leaders with level 0 recruits!
-
- Posts: 21
- Joined: November 15th, 2019, 8:54 pm
Re: Nested quoted string, can someone help me ?
Hi, thanks highlighter sounds like a big helpMoonyDragon wrote: ↑August 6th, 2020, 2:22 pm What Wesnoth tells you is that you have a " too many in the 5th line of youra_simple_start.cfg
file. If you take a closer look at that line, you will see the error pretty quickly:
background="{~add-ons/simple_start/images/wesnoth-map.png"}"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
Such errors are glaringly obvious if you use a syntax highlighter. You can find SH's for WML here.
i changed the line to "{~add-ons/simple_start/images/wesnoth-map.png}"
and got a different error message:
Détails :
Nested quoted string
at ~add-ons/simple_start/images/wesnoth-map.png:3
included from ~add-ons/simple_start/scenarios/a_simple_start.cfg:5
included from ~add-ons/simple_start/_main.cfg:35
any idea ?
Re: Nested quoted string, can someone help me ?
The
For example:
The directory to find that file is set by using
[background]
should just have a filename, without curly brackets. The curly brackets trigger the preprocessor, which inserts the contents of the .png file as if it were cut-and-pasted into the text file.For example:
Code: Select all
[part]
story= _ "Eldred was a brave and courageous warrior"
background=story/httt_story2.jpg
[/part]
[binary_path]
elsewhere in your add-on. Double-quotes are optional around the filename.-
- Posts: 21
- Joined: November 15th, 2019, 8:54 pm
Re: Nested quoted string, can someone help me ?
Hi, thanks for the help ! so my code should look like this? :octalot wrote: ↑August 6th, 2020, 3:17 pm The[background]
should just have a filename, without curly brackets. The curly brackets trigger the preprocessor, which inserts the contents of the .png file as if it were cut-and-pasted into the text file.
For example:
The directory to find that file is set by usingCode: Select all
[part] story= _ "Eldred was a brave and courageous warrior" background=story/httt_story2.jpg [/part]
[binary_path]
elsewhere in your add-on. Double-quotes are optional around the filename.
Code: Select all
[story]
[part]
background=images/wesnoth-map.png
story= _ "Depuis des siècles, le rôle de l'inquisition est de purifier les terres de wesnoth des infamies qui y existe..."
[/part]
[background_layer]
image=images/wooden background.jpg
[/background_layer]
[part]
background="{~add-ons/simple_start/images/Lieutenant.png}"
story= _ "Ceci est la courte histoire du jeune lieutenant templier, Lydéric qui doit nettoyer une valée d'une menace mort-vivante"
[/part]
[/story]
Re: Nested quoted string, can someone help me ?
Almost there.
I don't know what your "wooden_background.jpg" and "wesnoth-map.png" are, however if they are the same as in the main menu screen, they are available without you having to copy it into your addon, just use "maps/background.jpg" and "maps/titlescreen.png" instead, respectively.
(Also, if "Lieutenant.png" is the vanilla leutenant portait, then it's just "portraits/humans/lieutenant.png". Don't use capital letters.)
If you're that new to WML, and are not yet very familiar with the syntax of the tags or how they work, then I highly recommend getting familiar with the wiki You'll find everything there in clear, easy to follow articles.
- Firstly, you still have curly brackets in your second
[part]
. Your addon should have a[binary_path]
in its definiton, so that {~add-ons/simple_start/images/} is accessible, and then you should just input the image location from there, see example below. - Secondly, you have a space in your filename in the
[background_layer] image=images/wooden background.jpg
. That is incorrect, filenames are never allowed to have spaces in them, use an underscore (_). - Thirdly,
[background_layer]
also goes into the respective[part]
's. Also, I don't know how an explicit background= and [background_layer]'s work together. The former is for just loading a single, pre-created image, and the second is obviously for layering images "within the game." So in this case I'd stick to using just layers, labeling what you used as the base layer, and adding what you used in "background=" on top of it (scaling parameters in the example are of course optional, but it'll help with different screen resolutions once your addon is published):
Code: Select all
[story]
[part]
story= _ "Depuis des siècles, le rôle de l'inquisition est de purifier les terres de wesnoth des infamies qui y existe..."
[background_layer]
image=wesnoth-map.png
scale_vertically=yes
scale_horizontally=no
keep_aspect_ratio=yes
[/background_layer]
[background_layer]
image=wooden_background.jpg
scale_vertically=yes
scale_horizontally=no
keep_aspect_ratio=yes
base_layer=yes
[/background_layer]
[/part]
[part]
story= _ "Ceci est la courte histoire du jeune lieutenant templier, Lydéric qui doit nettoyer une valée d'une menace mort-vivante"
[background_layer]
image=Lieutenant.png
scale_vertically=yes
scale_horizontally=no
keep_aspect_ratio=yes
[/background_layer]
[background_layer]
image=wooden_background.jpg
scale_vertically=yes
scale_horizontally=no
keep_aspect_ratio=yes
base_layer=yes
[/background_layer]
[/part]
[/story]
(Also, if "Lieutenant.png" is the vanilla leutenant portait, then it's just "portraits/humans/lieutenant.png". Don't use capital letters.)
If you're that new to WML, and are not yet very familiar with the syntax of the tags or how they work, then I highly recommend getting familiar with the wiki You'll find everything there in clear, easy to follow articles.
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
- MoonyDragon
- Posts: 149
- Joined: November 29th, 2017, 5:46 pm
Re: Nested quoted string, can someone help me ?
When you write...
... in your _main.cfg file, this means that you can use images within
In short, this:
Conversely, change all instances of
Code: Select all
[binary_path]
path=data/add-ons/simple_start/
[/binary_path]
data/add-ons/simple_start/images/
without writing out the full path.In short, this:
data/add-ons/simple_start/images/my_cool_folder/my_awesome_image.png
becomes this: my_cool_folder/my_awesome_image.png
.Conversely, change all instances of
background="{~add-ons/simple_start/images/Lieutenant.png}"
, to background=Lieutenant.png
.Default L0 Era - Level 1 leaders with level 0 recruits!
-
- Posts: 21
- Joined: November 15th, 2019, 8:54 pm
Re: Nested quoted string, can someone help me ?
Hi, thank you very much ! Your message helped me a lot in understanding what i was doing. Also no more errors! however it seems i'm yet to understand how layering works since i'm only getting maps/background.jpg in the screen (wich already is an improvement). i'll try and tweak with that and search on the wiki. Thanks again !WhiteWolf wrote: ↑August 6th, 2020, 3:50 pm Almost there.
- Firstly, you still have curly brackets in your second
[part]
. Your addon should have a[binary_path]
in its definiton, so that {~add-ons/simple_start/images/} is accessible, and then you should just input the image location from there, see example below.- Secondly, you have a space in your filename in the
[background_layer] image=images/wooden background.jpg
. That is incorrect, filenames are never allowed to have spaces in them, use an underscore (_).- Thirdly,
[background_layer]
also goes into the respective[part]
's. Also, I don't know how an explicit background= and [background_layer]'s work together. The former is for just loading a single, pre-created image, and the second is obviously for layering images "within the game." So in this case I'd stick to using just layers, labeling what you used as the base layer, and adding what you used in "background=" on top of it (scaling parameters in the example are of course optional, but it'll help with different screen resolutions once your addon is published):I don't know what your "wooden_background.jpg" and "wesnoth-map.png" are, however if they are the same as in the main menu screen, they are available without you having to copy it into your addon, just use "maps/background.jpg" and "maps/titlescreen.png" instead, respectively.Code: Select all
[story] [part] story= _ "Depuis des siècles, le rôle de l'inquisition est de purifier les terres de wesnoth des infamies qui y existe..." [background_layer] image=wesnoth-map.png scale_vertically=yes scale_horizontally=no keep_aspect_ratio=yes [/background_layer] [background_layer] image=wooden_background.jpg scale_vertically=yes scale_horizontally=no keep_aspect_ratio=yes base_layer=yes [/background_layer] [/part] [part] story= _ "Ceci est la courte histoire du jeune lieutenant templier, Lydéric qui doit nettoyer une valée d'une menace mort-vivante" [background_layer] image=Lieutenant.png scale_vertically=yes scale_horizontally=no keep_aspect_ratio=yes [/background_layer] [background_layer] image=wooden_background.jpg scale_vertically=yes scale_horizontally=no keep_aspect_ratio=yes base_layer=yes [/background_layer] [/part] [/story]
(Also, if "Lieutenant.png" is the vanilla leutenant portait, then it's just "portraits/humans/lieutenant.png". Don't use capital letters.)
If you're that new to WML, and are not yet very familiar with the syntax of the tags or how they work, then I highly recommend getting familiar with the wiki You'll find everything there in clear, easy to follow articles.
Re: Nested quoted string, can someone help me ?
It's because I made a small mistake, sorry for that, I confused the order of the layers. They are put onto each other from top to bottom, so in the example code in my previous post, background.jpg is the top layer, completely hiding the map which is just behind it. My other mistake is that base_layer should also be the map and not the background, because we want to align the other images to that one. Here's the correct code:
Code: Select all
[part]
story= _ "..."
[background_layer] # first layer - the background
image=maps/background.jpg
scale_vertically=yes
scale_horizontally=no
keep_aspect_ratio=yes
[/background_layer]
[background_layer] # second layer, the map
image=maps/titlescreen.png
scale_vertically=yes
scale_horizontally=no
keep_aspect_ratio=yes
base_layer=yes # which is also the base layer, to which the other images are aligned
[/background_layer]
[/part]
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
-
- Posts: 21
- Joined: November 15th, 2019, 8:54 pm
Re: Nested quoted string, can someone help me ?
Hi, sorry for the late reply . I will try that, thank youWhiteWolf wrote: ↑August 7th, 2020, 12:26 pmIt's because I made a small mistake, sorry for that, I confused the order of the layers. They are put onto each other from top to bottom, so in the example code in my previous post, background.jpg is the top layer, completely hiding the map which is just behind it. My other mistake is that base_layer should also be the map and not the background, because we want to align the other images to that one. Here's the correct code:Same order goes for the lieutenant image.Code: Select all
[part] story= _ "..." [background_layer] # first layer - the background image=maps/background.jpg scale_vertically=yes scale_horizontally=no keep_aspect_ratio=yes [/background_layer] [background_layer] # second layer, the map image=maps/titlescreen.png scale_vertically=yes scale_horizontally=no keep_aspect_ratio=yes base_layer=yes # which is also the base layer, to which the other images are aligned [/background_layer] [/part]