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.
monochromatic
Posts: 1549
Joined: June 18th, 2009, 1:45 am

Re: Unknown scenario error

Post by monochromatic »

In the first scenario you wrote:

Code: Select all

next_scenario=2_Resist_Enemy
In the second scenario you wrote:

Code: Select all

id=02_Resist_Enemy
:whistle:
EDIT: Ninja'd
User avatar
Nordvind
Posts: 8
Joined: December 25th, 2009, 10:27 am
Contact:

Re: Unknown scenario error

Post by Nordvind »

Kind of same problem here (Unknown Scenario: '01_The_Castle'). Tripple-checked the id, name and name of file and still the same.
_main.cfg:
Spoiler:
And 01_The_Castle.cfg
Spoiler:
Thank you in advance for help.
Last edited by Nordvind on November 15th, 2010, 9:25 pm, edited 1 time in total.
Inveniam viam aut fasciam
User avatar
pauxlo
Posts: 1047
Joined: September 19th, 2006, 8:54 pm

Re: Unknown scenario error

Post by pauxlo »

Nordvind wrote:Kind of same problem here (Unknown Scenario: '01_The_Castle'). Tripple-checked the id, name and name of file and still the same.
[...]
And 01_The_Castle.cfg

Code: Select all

#textdomain wesnoth-Last_Castle
[scenario]
	id=01_The_Castle
	name = _"The Castle"
	map_data = {~add-ons/Last_Castle/maps/0_last_castle.map}
	victory_when_enemies_defeated = yes
	experience_modifier = 90
	turns = 30
[...]
[/scenario]
Thank you in advance for help.
First, your WML code is better readable in

Code: Select all

 tags (then the forum software uses another font and does not throw away spaces).

Second, maybe try to put "" around your included map.
monochromatic
Posts: 1549
Joined: June 18th, 2009, 1:45 am

Re: Unknown scenario error

Post by monochromatic »

Get rid of the spaces between the equal signs and text. It should look like this:

Code: Select all

key=value
or

Code: Select all

key="value"
I didn't look through it carefully, but the syntax seems to be correct. I'd think that this is the issue.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Unknown scenario error

Post by zookeeper »

elvish_sovereign wrote:Get rid of the spaces between the equal signs and text. It should look like this:

Code: Select all

key=value
or

Code: Select all

key="value"
I didn't look through it carefully, but the syntax seems to be correct. I'd think that this is the issue.
No, that has nothing to do with it. He has an actual major syntax error there.
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Unknown scenario error

Post by Anonymissimus »

Code: Select all

Line 43: Attribute not available in this context: 'description'
Line 44: Attribute not available in this context: 'user_description'
Line 54: Attribute not available in this context: 'description'
Line 55: Attribute not available in this context: 'user_description'
That means, [side]id= to define a leader is missing.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
monochromatic
Posts: 1549
Joined: June 18th, 2009, 1:45 am

Re: Unknown scenario error

Post by monochromatic »

zookeeper wrote:
elvish_sovereign wrote:Get rid of the spaces between the equal signs and text. It should look like this:

Code: Select all

key=value
or

Code: Select all

key="value"
I didn't look through it carefully, but the syntax seems to be correct. I'd think that this is the issue.
No, that has nothing to do with it. He has an actual major syntax error there.
:hmm: The wiki should be updated then: http://wiki.wesnoth.org/SyntaxWML
the wiki wrote:There should be no space between the key and the '=' symbol! If there is whitespace, the attribute assignment is ignored.
winterboy
Posts: 2
Joined: April 8th, 2012, 2:40 pm

Re: Unknown scenario error

Post by winterboy »

hi
sorry to bother you guys but i have same problem. This is my first campaign. Could someone solve the problems i have.
Thanks
Attachments
wesnoth-test.rar
(1.85 MiB) Downloaded 162 times
User avatar
Adamant14
Posts: 966
Joined: April 24th, 2010, 1:14 pm

Re: Unknown scenario error

Post by Adamant14 »

@winterboy
1. In your _main.cfg you call your first scenario 'the_first_scenario', but the id of your first scenario is 'wesnoth-test'.
2. Unit-type Commander is not in core and not in your campaign folder, so the engine can not find it.
3. There are a lot if illegal titles in your map.
Author of Antar, Son of Rheor ( SP Campaign) | Development Thread + Feedback Thread + Replays of ASoR
winterboy
Posts: 2
Joined: April 8th, 2012, 2:40 pm

Re: Unknown scenario error

Post by winterboy »

thank you
you helped alot
Mu
Posts: 60
Joined: February 10th, 2005, 6:01 pm

Re: Unknown scenario error

Post by Mu »

I was near to starting to cry because I had the same error, and nothing worked.

I finally figured out,I post here my mistake just in case someone is as stupid as me ;)

My WRONG code:

Code: Select all

 

[campaign]

   ...

#ifdef CAMPAIGN_TALE_OF_2SIS

{~add-ons/A_Tale_of_Two_Sisters/scenarios}
{~add-ons/A_Tale_of_Two_Sisters/maps}
    [binary_path]
        path=~add-ons/A_Tale_of_Two_Sisters/
    [/binary_path]

    [+units]
        {~add-ons/A_Tale_of_Two_Sisters/units}
    [/units]

[/campaign]

That is wrong because the #ifdef part was inside the [campaign] part.

The CORRECT code:

Code: Select all

 

[campaign]

   ...
[/campaign]

#ifdef CAMPAIGN_TALE_OF_2SIS

{~add-ons/A_Tale_of_Two_Sisters/scenarios}
{~add-ons/A_Tale_of_Two_Sisters/maps}
[binary_path]
    path=~add-ons/A_Tale_of_Two_Sisters/
[/binary_path]

[+units]
    {~add-ons/A_Tale_of_Two_Sisters/units}
[/units]
Post Reply