Unterminated!!!

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.
dark_cleou
Posts: 22
Joined: January 4th, 2006, 11:31 am

Post by dark_cleou »

So how are we gonna solve this or these problems....the UNTERMINATED!!!! That needs to be terminated? Maybe you zookeeper for a favor attach the next post your working Arimatheans.cfg....Ill just make the scenarios....
here is a helper and a Helpless...Pls. help the helpless...like me...
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

The latest version of the campaign file that you posted works. The bug is very likely in your scenario file(s). The scenarios get "read in" inside the #ifdef, that's why the error is traced back to the #ifdef.
dark_cleou
Posts: 22
Joined: January 4th, 2006, 11:31 am

Post by dark_cleou »

So what am I to do with my scenarios or ifdef? Maybe you should attach here your working cfg...
here is a helper and a Helpless...Pls. help the helpless...like me...
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

dark_cleou wrote:So what am I to do with my scenarios or ifdef? Maybe you should attach here your working cfg...
I don't know anything about your scenarios. And I don't attach a working campaign .cfg, because you've already posted one.
dark_cleou
Posts: 22
Joined: January 4th, 2006, 11:31 am

Post by dark_cleou »

Well the scenario is nice but i suggest you to make an Arimatheans.cfg like in my format and attach the Arimatheans.cfg here for you said you tested the Arimatheans.cfg in your computer and it works well...
here is a helper and a Helpless...Pls. help the helpless...like me...
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

No. Understand what people tell you when you ask for help and at least give a reason if you don't do what you're told, and you might have a chance of getting help in the future, too.
dark_cleou
Posts: 22
Joined: January 4th, 2006, 11:31 am

Post by dark_cleou »

Code: Select all

[scenario]


id=surprise_siege
next_scenario=pursuing_w

	[story]
		[part]
		story= _ "As we had heard, there is a land called Wesnoth."

		[/part]

		[part]
		story= _ "Wesnoth once is a nation...built by merry humans...making the nation powerful...but their greed made them suffer..."
		
		[/part]

		[part]
		story= _ "As they realized what they'd done, they happily restored it to a nation once again...but new invasions happened making Wesnoth a colony...but in a poor substitute comes the merciless suns..."
		
		[/part]

		[part]
		story= _ "And so many survivors hid under caves or hidden places...they produced many descendants, every race. But because of great despair, the chiefs forgot to tell what was before."
		
		[/part]

		[part]
		story= _ "But before the dual suns' extreme heatness, the writers of the records of Wesnoth compiled them in 5 books. The 5 books were separated in each writer, going to other places to hide during the extreme heat."
		
		[/part]

		[part]
		story= _ "The 5 books were accidentally buried in the 5 capitals of 5 different races."

		[/part]
 				
		[part]
		story= _ "After the extreme heat is the birth of the new sun, meaning the going back of the climate during Wesnothian times, the 5 different races got out of their places and set up their new homes in their new land, not knowing what happened and how it started for its hidden History."
		
		[/part]

		[part]
		story= _ "The orcs set their homes in the formerly capital, the  humans, south of the Great River, now called River Arimath and called their place Goolbi formerly Wesnoth. So are the groups of dwarves, elves and undead joined themselves in the land just south of Knalga, now Noor, but just north of Arimath river."

		[part]
		story= _ "But during that time the land of the dead was not in peace. The war was between the orcs with the powerful Mal-Ravanal and the heroes of the lawfuls. The chaotic races won over it and the dead orcs asked for Mal-Ravannal to uncover the past to the lived orcs and continue fighting for land and superiority."

		[/part]
		
		[part]
		story= _ "Eagerly, Mal-Ravannal approved it. He went to the orcish capital and reveal the stories of their anscestors. The orcs became again too greedy and organized an army to Arimath for invasion."
		[/part]

		[part]
		story= _ "The land of Goolbi also want more land and had a civil war for a time which separated the kingdoms to Golmania, formerly Elensefar and Gogoltia, formerly Weldyn laws. Golmanians were peaceful men while Gogoltians were to greedy to have more land and slaves. So they march north to Arimath to, like the orcs, invade the spacious kingdom."

		[/part]

		[part]
		story= _ "The Arimatheans were shocked to see orcs to the west and humans to the south."

		[/part]




	[/story]

 
name=Arimatheans
map_data=4nJnntnggrrggUUCCCCC
nnntnnnggrgggWgCC6CC
nnnnnnvggrgggttCCCCv
nWvnnWmWgrgWgWgCCvCC
nWWWWoWvouovWfWWWCWW
nWDuo2ovuvmgftfgC3Ct
IJWWooogDummfffgCCCg
BMuouDuvwNmwfffgCCCt
JMMJPuuDNqNwvftffffg
PIBoWtDuq1qvgDgftfff
IJMWuuDDqqqggwgftftf
UMMMouuwfwfDwwftftft
UIJWuoDvfvvgwfffffft
JJDWWWWo|oWWWWfovvfW
MMWBfcss|sscggWs|oWD
MMJfffcW|//ogss//\tD
JJJfttfXXXXggo/XfWDW
UIBIfffotftcXXXCWCWt
JJJJfftffftCcCWCtCCC
JBJnMBfott|CCCCtCCC7
JnnMMccsc/ccCCCCCCCC
nBMBnnnnnc|cCcCsccCc
nnMnMnnnns|gcgcCCCCC
nnnnnsnnncggggCCCCCC
5nnnncn9nncsggggggC8

turns=unlimited

{DAWN}
{MORNING}
{AFTERNOON}
{DUSK}
{FIRST_WATCH}
{SECOND_WATCH}

music=

[event]
name=prestart
	[objectives]
	side=1
	  [objective]
	  description= _ "Defeat the Orcs and the Humans"
	  condition=win
	  [/objective]
	  [objective]
	  description= _ "Death of Absel"
			     "Death of Numrif"
			     "Death of Keilenz"
	  condition=lose
	  [/objective]
	[/objectives]
[/event]

[side]
side=1
controller=human
team_name=1

type=Initiate
description=Absel
canrecruit=1

recruit=Dark Adept,Ghost,Ghoul,Initiate,Blood Bat,Wraith,Bone Shooter,Shadow,Skeleton Archer,Necromancer,Necrophage,Revenant,Deathblade

{GOLD 1000 800 500}
{INCOME 8 5 1}
[/side]

[side]
side=2
controller=human
team_name=1

type=Dwarfish Fighter
description=Numrif
canrecruit=1

recruit=Dwarfish Ulfserker,Dwarfish Steelclad,Gryphon Rider,Gryphon Master,Dwarfish Thunderer,Dwarfish Thunderguard,Thief,Rogue,Bandit,Dwarfish Fighter,Trapper,Poacher

{GOLD 1000 800 500}
{INCOME 8 5 1}
[/side]

[side]
side=3
controller=human
team_name=1

type=Elvish Fighter
description=Numrif
canrecruit=1

recruit=Elvish Fighter,Elvish Archer,Elvish Shaman,Elvish Scout,Elvish Rider,Elvish Captain,Elvish Hero,Elvish Marksman,Elvish Ranger,Mage,White Mage,Red Mage

{GOLD 1000 800 500}
{INCOME 8 5 1}
[/side]

[side]
side=4
controller=ai
team_name=2

type=Orcish Leader
description=Tal-Malil
canrecruit=1

recruit=Wolf Rider,Goblin Knight,Goblin Pillager,Goblin Spearman,Goblin Impaler,Orcish Grunt,Orcish Warrior,Troll Whelp,Troll,Orcish Slayer,Orcish Archer,Orcish Crossbowman

{GOLD 1000 1800 2500}
{INCOME 8 5 1}
[/side]

[side]
side=5
controller=ai
team_name=2

type=Orcish Leader
description=Tal-Malul
canrecruit=1

recruit=Wolf Rider,Goblin Knight,Goblin Pillager,Goblin Spearman,Goblin Impaler,Orcish Grunt,Orcish Warrior,Troll Whelp,Troll,Orcish Slayer,Orcish Archer,Orcish Crossbowman

{GOLD 1000 1800 2500}
{INCOME 8 5 1}
[/side]

[side]
side=6
controller=ai
team_name=1

type=Elvish Lord
description=Kelmenz
canrecruit=1

recruit=Elvish Fighter,Elvish Archer,Elvish Shaman,Elvish Scout,Elvish Rider,Elvish Captain,Elvish Hero,Elvish Marksman,Elvish Ranger,Mage,White Mage,Red Mage

{GOLD 1000 800 500}
{INCOME 8 5 1}
[/side]

[side]
side=7
controller=ai
team_name=3

type=Royal Guard
description=Roger
canrecruit=1

recruit=Calvaryman,Horseman,Mage,White Mage,Knight,Calvalier,Dragoon,Grand Knight,Silver Mage,Arch Mage,Red Mage,Bowman,Longbowman,Fencer,Lieutenant,Young Ogre,Spearman,Swordsman,Pikeman,Heavy Infantryman,Shock Trooper

{GOLD 1000 1800 2500}
{INCOME 8 5 1}
[/side]

[side]
side=8
controller=ai
team_name=3

type=General
description=Radwin
canrecruit=1

recruit=Calvaryman,Horseman,Mage,White Mage,Knight,Calvalier,Dragoon,Grand Knight,Silver Mage,Arch Mage,Red Mage,Bowman,Longbowman,Fencer,Lieutenant,Young Ogre,Spearman,Swordsman,Pikeman,Heavy Infantryman,Shock Trooper

{GOLD 1000 1800 2500}
{INCOME 8 5 1}
[/side]

[side]
side=9
controller=ai
team_name=2

type=Orcish Slayer
description=Tah-Ahiha
canrecruit=1

recruit=Wolf Rider,Goblin Knight,Goblin Pillager,Goblin Spearman,Goblin Impaler,Orcish Grunt,Orcish Warrior,Troll Whelp,Troll,Orcish Slayer,Orcish Archer,Orcish Crossbowman

{GOLD 250 500 1000}
{INCOME 8 5 1}
[/side]


[/scenario]
ok this scenario is just simple...when my campaign is now working I will now add additional effects and campaigns...
here is a helper and a Helpless...Pls. help the helpless...like me...
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Quote the map in map_data.

Code: Select all

turns=unlimited
Invalid.

Code: Select all

description= _ "Death of Absel"
		  "Death of Numrif"
		  "Death of Keilenz"
Wrong.

I suggest you find about what exactly is wrong with these yourself, you'll learn more that way. And you'll need to learn, because these are very elementary errors.
dark_cleou
Posts: 22
Joined: January 4th, 2006, 11:31 am

Post by dark_cleou »

But the invalid here in my scenario doesn't affect the #ifdef at all...all i see in the error is the unterminated #ifdef...not these invalid things...all i want is to see in the campaign list my campaign...I don't care about its content...
here is a helper and a Helpless...Pls. help the helpless...like me...
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

You still have something wrong then. Look at other campaigns and see how they do things.

PS. I'm done with this thread.
dark_cleou
Posts: 22
Joined: January 4th, 2006, 11:31 am

Post by dark_cleou »

Oh yes...thanks a LOT for your great supports and replies...but once more, if you tried to try the Arimatheans.cfg in your computer and it is working, better attach the file here in the forum...that's the last help i can get from you...
here is a helper and a Helpless...Pls. help the helpless...like me...
scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

dark_cleou wrote:But the invalid here in my scenario doesn't affect the #ifdef at all...all i see in the error is the unterminated #ifdef...not these invalid things...all i want is to see in the campaign list my campaign...I don't care about its content...
You misunderstand.

THE ERRORS IN YOUR SCENARIO ARE CAUSING THE UNTERMINATED #IFDEF ERROR.

It's just how the WML parser works.
Hope springs eternal.
Wesnoth acronym guide.
dark_cleou
Posts: 22
Joined: January 4th, 2006, 11:31 am

Post by dark_cleou »

So can somebody figure out what is zookeeper saying about in the scenario...what does he mean of the invalid map or the invalid descriptions..? The campaign scenario is there :? :? :( :(
here is a helper and a Helpless...Pls. help the helpless...like me...
toms
Posts: 1717
Joined: November 6th, 2005, 2:15 pm

Post by toms »

dark_cleou wrote:

Code: Select all

[campaign]
#ifdef CAMPAIGN_ARIMATHEANS

{@campaigns/Arimatheans/}

#endif
I would rather take {@campaigns/Arimatheans}, without the slash.

Have you ever looked at the create pages? :wink: :)
Or just spy out the other campaigns.
First read, then think. Read again, think again. And then post!
Steelclad Brian
Posts: 110
Joined: November 15th, 2005, 5:26 am

Post by Steelclad Brian »

WML error messages are very misleading. While I absolutely love the WML scripting system the devs have developed, the error message system is still imprecise and can imply very incorrect conclusions to the inexperienced. I nearly had a fit trying to debug something that the game told me was in Scenario 1, when it was really a conflicting macro from Scenario 3's text file. Until you thoroughly understand how WML is processed you can't just take a statement and interpret it with 100% certainty.

So, your scenario file has one or more errors in it. You need to find them and fix them. The incredibly helpful and nice people here will help you find them if you'd like, but only if you work with them. These guys know more about WML then you - take their suggestions seriously and you'll be much closer to solving your problem.

EDIT: See I had the exact same problem and finally figured out what was wrong. It kept telling me scenario 1 was broken and wouldn't load, but I tracked down my last addition to scenario 3 (these two scenarios really don't seem to like each other) and I found I had a message with an unterminated ". Unterminated stuff seems to be the number one most confusing error to debug - it's much better to examine the stuff you've most recently added then to just blindly pursue line-numbers and file names.

Also if I can give some general programming advice: start small, test what you did, and then expand toward your final product. If you have a scenario with 6 sides, with 20 events, start by defining the 6 sides and 1 or 2 events. When that works start adding more events, and always test immediately afterwords.
Post Reply