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
Gregorius
Posts: 24
Joined: October 24th, 2009, 3:24 pm

Unknown scenario error

Post by Gregorius »

I'm actually working on a campaign and finished the first both scenarios, now with the third I get a unknown scenario error, I have deleted every part already but didn't find it yet. Fortunatly this error appeard when I tried the first test so I didn't write that much
Spoiler:
User avatar
Pentarctagon
Project Manager
Posts: 4646
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Unknown scenario error

Post by Pentarctagon »

if you are using 1.7/1.8, map_data should be

Code: Select all

map_data="{~add-ons/Noname/maps/03_The_Tunnel.map}"
not

Code: Select all

map_data="{@campaigns/Noname/maps/03_The_Tunnel.map}"
also, the id is 02_The_Tunnel, but the name of the map is 03_The_Tunnel. not sure if that would really affect anything though.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
Gregorius
Posts: 24
Joined: October 24th, 2009, 3:24 pm

Re: Unknown scenario error

Post by Gregorius »

wrong Id, must have been blind not to have seen it, thanks :oops:
Gregorius
Posts: 24
Joined: October 24th, 2009, 3:24 pm

Re: Unknown scenario error

Post by Gregorius »

Now that this threat is open anyway I'd feel bad opening a new one this quick.
The Dragon should join you for the scenario, I know how to delete him after the scenario (use kill and his id) but don't know how to change his side. just creating a unit there, killing it and then creating a new one with side=1 would be a somewhat stupid way.
searched this in the forum but didn't find it.
User avatar
artisticdude
Moderator Emeritus
Posts: 2424
Joined: December 15th, 2009, 12:37 pm
Location: Somewhere in the middle of everything

Re: Unknown scenario error

Post by artisticdude »

Gregorius wrote:just creating a unit there, killing it and then creating a new one with side=1 would be a somewhat stupid way.
:| Why? It works, and it's the only way to do it, so far as I know.
"I'm never wrong. One time I thought I was wrong, but I was mistaken."
Gregorius
Posts: 24
Joined: October 24th, 2009, 3:24 pm

Re: Unknown scenario error

Post by Gregorius »

No, I recall having seen it on BMR once, but I don't have it installed and my comp is just far too slow to install it, much to big for my old comp
mich
Translator
Posts: 134
Joined: November 11th, 2008, 8:54 am
Location: Italy

Re: Unknown scenario error

Post by mich »

You can store the unit in a variable, change his side and then unstore. take a look at [store_unit], [set_variable] and [unstore_unit].
Something like this (not tested) must work

Code: Select all

[store_unit]
    [filter]
        id=yourunitid
    [/filter]
    variable=yourvar
[/store_unit]
[set_variable]
    name=yourvar.side
    value=1
[/set_variable]
[unstore_unit]
    variable=yourvar
[/unstore_unit]
[clear_variable]
    name=yourvar
[/clear_variable]
Gregorius
Posts: 24
Joined: October 24th, 2009, 3:24 pm

Re: Unknown scenario error

Post by Gregorius »

Didn't work, I guess I'll go back to kill and create new unit, only working way I got right now...
mich
Translator
Posts: 134
Joined: November 11th, 2008, 8:54 am
Location: Italy

Re: Unknown scenario error

Post by mich »

Strange. You can try with the MODIFY_UNIT macro (it's the same code, more or less).

Code: Select all

{MODIFY_UNIT id=put_here_the_id_of_your_unit side 1}
User avatar
artisticdude
Moderator Emeritus
Posts: 2424
Joined: December 15th, 2009, 12:37 pm
Location: Somewhere in the middle of everything

Re: Unknown scenario error

Post by artisticdude »

I think the problem is that when you set the yourvar.side variable, it sets the variable but doesn't connect it to the side number. It sees it only as a variable with undefined consequences to be set.

Ahh, shoot, mich beat me to it. :lol2: I was also going to suggest that you modify the unit.
"I'm never wrong. One time I thought I was wrong, but I was mistaken."
Gregorius
Posts: 24
Joined: October 24th, 2009, 3:24 pm

Re: Unknown scenario error

Post by Gregorius »

yeah, this works, thanks alot for your help, guys
Post Reply