bugBattle for Wesnoth - Bugs: bug #21778, Parser/preprocessor errors when...

 
 
Show feedback again

bug #21778: Parser/preprocessor errors when loading a campaign result in misleading "Unknown scenario" error

Submitted by:  Ignacio R. Morelle <shadowmaster>
Submitted on:  Mon 10 Mar 2014 06:15:35 AM UTC  
 
Category: Feature RequestSeverity: 3 - Normal
Priority: 5 - NormalItem Group: User Interface
Status: NonePrivacy: Public
Assigned to: Ignacio R. Morelle <shadowmaster>Open/Closed: Open
Release: *Operating System: *

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 10 Mar 2014 06:16:52 AM UTC, comment #1:

It's also important to note this applies to standalone [scenario], [multiplayer], and [test] scenarios as well, which complicates the matter further if there is no [campaign] whose existence should be tested.

Ignacio R. Morelle <shadowmaster>
Project AdministratorIn charge of this item.
Mon 10 Mar 2014 06:15:35 AM UTC, original submission:

Whenever Wesnoth is unable to load the WML for an add-on that provides a campaign that's being started or reloaded, an "Unknown scenario" error message appears after the parser/preprocessor error report.

Past experience shows that users and novice WML coders may not necessarily understand the correlation between both failure symptoms, and may in fact overlook the parser/preprocessor error report.

The problem with this is that the "Unknown scenario" error may in fact appear in a normal situation where e.g. a [scenario] id has changed and the [campaign] first_scenario attribute or the scenario id in a saved game hasn't been updated accordingly.

Ideally, when starting/loading a game, we should quit immediately after the add-on it requires has failed to load. This situation could be detected by checking for the absence of the [campaign] definition the game requires and whether any WML load errors occurred before getting to that stage. The problem with this approach is that this may lead to situations where the [campaign] definition is truly missing and the WML load errors are in a different add-on (there's no way to know from the engine's PoV which add-on is expected to define a [campaign]).

This requires some additional thought before moving onto the implementation phase. I'm filing this feature request mostly as a reminder for myself.

Ignacio R. Morelle <shadowmaster>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by shadowmaster (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup