Unknown Scenario Error

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
SmokemJags
Posts: 580
Joined: February 14th, 2006, 3:24 am
Location: New Avalon
Contact:

Unknown Scenario Error

Post by SmokemJags »

Code: Select all

Error
Unknown Scenario: '1Turncoat'
Unnatural_Corruption.cfg

Code: Select all

[campaign]
	id=Unnatural_Corruption
	rank=3
	name= _ "Unnatural_Corruption"
	define=CAMPAIGN_UNNATURAL_CORRUPTION
    first_scenario=1Turncoat 
	difficulties=EASY,NORMAL,HARD
	difficulty_descriptions={MENU_IMG_TXT2 units/orcs/orcish-grunt.png _"Easy" _"(Simple)"} + 
		";*" + {MENU_IMG_TXT2 units/orcs/orcish-warrior.png _"Normal" _"(Moderate)"} + 
		";" + {MENU_IMG_TXT2 units/orcs/orcish-warlord.png _"Hard" _"(Advanced)"}         
	icon=units/orcs/orcish-warlord-attack-sword-1.png
	image=portraits/core/Neoriceisgood/orcish_leader.png
	description= _ "Lead Mazonry through a campaign to discover a strange corruption that has overcome his fellow orcs."
[/campaign]

[binary_path]
path=data/campaigns/Unnatural_Corruption
[/binary_path]

#ifdef CAMPAIGN_UNNATURAL_CORRUPTION
{@campaigns/Unnatural_Corruption/scenarios}
{@campaigns/Unnatural_Corruption/utils}
#endif
Starting lines of 1Turncoat.cfg

Code: Select all

[scenario]
	id=1Turncoat
	name= _ "1Turncoat"

	map_data="{@campaigns/Unnatural_Corruption/maps/1Turncoat}"
	{TURNS 20 18 15}
	{@campaigns/Unnatural_Corruption/utils/story.cfg}

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

	next_scenario="2Unwelcoming_Party"
	

	[event]
....
...
...
[/scenario]
Map file is named 1Turncoat.
Why can't it find the scenario?
"A wise man speaks when he has something to say. A fool speaks when he has to say something."
ILikeProgramming
Posts: 837
Joined: April 14th, 2005, 4:17 am

Post by ILikeProgramming »

Did you forget to close a quote?
SmokemJags
Posts: 580
Joined: February 14th, 2006, 3:24 am
Location: New Avalon
Contact:

Post by SmokemJags »

Not that I can see.
Any ideas what else might be wrong?
Or do you need to see more files?
"A wise man speaks when he has something to say. A fool speaks when he has to say something."
scott
Posts: 5248
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

Did you actually cut out the ... stuff or is that stuff still in there? Does it work if you cut the events out?

Also, in your campaign ifdef, put the utils line above the scenarios line. I don't think this impacts your problem, but it should help other things. In fact, you can try leaving it out. Your intro.cfg include should work without it.

You don't get any other errors?
Hope springs eternal.
Wesnoth acronym guide.
SmokemJags
Posts: 580
Joined: February 14th, 2006, 3:24 am
Location: New Avalon
Contact:

Post by SmokemJags »

I cut the ... out for this thread only.

I tried cutting all of it out in the actual file and it gave me some new errors... not helpful though.

It says there's an error with 1turncoat.cfg.
Line 1...
What exactly does 'unexpected characters at start line' mean when start line is:

Code: Select all

[scenario]
	id=1Turncoat
	name= _ "1Turncoat"

	map_data="{@campaigns/Unnatural_Corruption/maps/1Turncoat}"
	{TURNS 20 18 15}
	{@campaigns/Unnatural_Corruption/utils/story.cfg}

	{DAWN}
	{MORNING}
	{AFTERNOON}
	{DUSK}
	{FIRST_WATCH}
	{SECOND_WATCH}
Attachments
1Turncoat.cfg
1turncoat.cfg in it's entirity.
(5.94 KiB) Downloaded 381 times
Error.jpg
Error.jpg (91.59 KiB) Viewed 4218 times
"A wise man speaks when he has something to say. A fool speaks when he has to say something."
User avatar
Noyga
Inactive Developer
Posts: 1790
Joined: September 26th, 2005, 5:56 pm
Location: France

Post by Noyga »

There is some Unicode Marker at the begining of the file and Wesnoth don't like that.
Edit the file in ASCII or ISO-8859-1 mode and remove the few garabage characters at the begining of the file, this should fix your problem.
SmokemJags
Posts: 580
Joined: February 14th, 2006, 3:24 am
Location: New Avalon
Contact:

Post by SmokemJags »



Are those the garbage characters?
Any idea where they came from cause that was really driving me insane last night.

Edit after fixing:
I luv you Noyga, I want bare your children! :D
I think I know what causes it, I should be able to address the problem now that I know what it is. Thx again, that was a huge headache I was having.
"A wise man speaks when he has something to say. A fool speaks when he has to say something."
User avatar
Noyga
Inactive Developer
Posts: 1790
Joined: September 26th, 2005, 5:56 pm
Location: France

Post by Noyga »

Yes those characters.
These are the unicode markers that Wesnoth don't understand.
scott
Posts: 5248
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

SmokemJags wrote:I luv you Noyga, I want bare your children! :D
I think that's illegal. You could offer to bear children for him, though.

I thought ott issued instructions for reverting the commit that caused those spurious characters...
Hope springs eternal.
Wesnoth acronym guide.
SmokemJags
Posts: 580
Joined: February 14th, 2006, 3:24 am
Location: New Avalon
Contact:

Post by SmokemJags »

scott wrote:I think that's illegal. You could offer to bear children for him, though.
Yes... quite right. :oops:
Though I don't fancy doing either very much. It was just a spur of the moment thing. :wink:

I thought ott issued instructions for reverting the commit that caused those spurious characters...
What's this about? "ott"?
I'm guessing this has been a problem before... but?
"A wise man speaks when he has something to say. A fool speaks when he has to say something."
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

You don't know who ott is? I guess you newbies are more out of touch with real Wesnoth development than I thought... ;)
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
SmokemJags
Posts: 580
Joined: February 14th, 2006, 3:24 am
Location: New Avalon
Contact:

Post by SmokemJags »

Sadly no, my single month here has limited my knowledge of 'who's who in Wesnoth'.

Anyways, where might these so-called instructions be found? I know I didn't see them anywhere...
"A wise man speaks when he has something to say. A fool speaks when he has to say something."
scott
Posts: 5248
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

They were more for developers. Someone sent a commit that added a bunch of unicode characters, and he recommended that the commit be undone rather than fix the issue by hand in each file. Embarrassingly, this has nothing to do with your problem. :oops: I have no idea why I brought it up.
Hope springs eternal.
Wesnoth acronym guide.
Post Reply