Opened 2 years ago

Closed 16 months ago

#6430 closed defect (needsinfo)

campaign disappeared

Reported by: orlandovjc Owned by:
Priority: Should Have Milestone:
Component: Core engine Keywords:
Cc: Patch:

Description

I played this afternoon, but when I hit continue campaign tonight, I get the following: error opening campaign run error campaign file does not exist.

Change History (3)

comment:1 by Langbart, 2 years ago

I can only reproduce the problem if I delete the campaign file.

0 A.D. (0.0.26) Main log (warnings and errors only)
ERROR: Error opening campaign run:

ERROR: Error: Campaign file does not exist

Have you deleted something from here: 0ad/saves?
wiki/GameDataPaths

Relevant code

Line 125 in CampaignRun.js

Line 
123 load()
124 {
125 if (!Engine.FileExists("saves/campaigns/" + this.filename + ".0adcampaign"))
126 throw new Error("Campaign file does not exist");
127 let data = Engine.ReadJSONFile("saves/campaigns/" + this.filename + ".0adcampaign");
128 this.data = data.data;
129 this.meta = data.meta;
130 this.template = CampaignTemplate.getTemplate(data.template_identifier);
131 if (!this.template)
132 throw new Error("Campaign template " + data.template_identifier + " does not exist (perhaps it comes from a mod?)");
133 return this;
134 }
Last edited 2 years ago by Langbart (previous) (diff)

comment:2 by Stan, 2 years ago

Milestone: Alpha 26Alpha 27

Unlikely to get done for A26

comment:3 by Freagarach, 16 months ago

Milestone: Alpha 27
Resolution: needsinfo
Status: newclosed

Maybe it couldn't be saved. Please check whether the save file is present.

Note: See TracTickets for help on using tickets.