Parse error in saved ship files

Problems and solutions for installing or running FreeOrion, including discussion of bugs if needed before posting a bug report. For problems building from source, post in Compile.
Post Reply
Message
Author
defaultuser
Vacuum Dragon
Posts: 583
Joined: Wed Aug 26, 2015 6:15 pm

Parse error in saved ship files

#1 Post by defaultuser » Sat Oct 28, 2017 11:06 pm

When I switched to a newer version (5/20 test) I noticed that many of the old saved files give an error when loaded. It usually doesn't stop the file from loading and the ship being available. Example:

Flux_trooper8.txt.focs.txt:3:4: Parse error. Expected Description = here:
ShipDesign
name = "Flux trooper8"
uuid = "be2ff8f5-874b-43f3-93e6-cedb69ed35c9"
^
description = "Design Description"
NoStringtableLookup
hull = "SH_SPATIAL_FLUX"
parts = [
"GT_TROOP_POD_2"

I'm not entirely sure what it's complaining about. Is it the description?

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12290
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Parse error in saved ship files

#2 Post by Geoff the Medio » Sat Oct 28, 2017 11:20 pm

defaultuser wrote:When I switched to a newer version (5/20 test)...
What does 5/20 mean? May 20? If so, use an actual new version, not a 6 month old one.
I noticed that many of the old saved files give an error when loaded. It usually doesn't stop the file from loading and the ship being available. Example:

Flux_trooper8.txt.focs.txt:3:4: Parse error.
The error with parsing of a content file, not the save. Presumably the same error would appear when starting a new game, not from a save.
Expected Description = here:
ShipDesign
name = "Flux trooper8"
uuid = "be2ff8f5-874b-43f3-93e6-cedb69ed35c9"
^
description = "Design Description"
NoStringtableLookup
hull = "SH_SPATIAL_FLUX"
parts = [
"GT_TROOP_POD_2"

I'm not entirely sure what it's complaining about. Is it the description?
It expects "description =" and is seeing "uuid =". I don't know what versions you're actually using, but maybe try removing the uuid lines from the saved design files.

Depending how you "switched over" to a different version, possibly there are incompatible script files being found in the resources or user settings directories.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Parse error in saved ship files

#3 Post by MatGB » Sun Oct 29, 2017 3:21 am

Ah, um, the problem here is having used the most recent test version to see if it works then going back to one that's less buggy on the machine isn't expected behaviour, the ship savegame backend has been redesigned substantially to allow for reordering and similarly useful stuff so a UUID has been added to each design.

This is done automatically on first load of a new version and it converts all old saved designs to the new format.

But if you go back to an older version (for reasons discussed in other threads), then it won't know what the new stuff is doing. If they're still loading and usable it's probably nothing to worry about.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

defaultuser
Vacuum Dragon
Posts: 583
Joined: Wed Aug 26, 2015 6:15 pm

Re: Parse error in saved ship files

#4 Post by defaultuser » Sun Oct 29, 2017 5:53 am

Geoff the Medio wrote:
defaultuser wrote:When I switched to a newer version (5/20 test)...
What does 5/20 mean? May 20? If so, use an actual new version, not a 6 month old one.
As I mentioned in the another thread, the 5/20 is playable with the screen problems (still not easy, but I'm getting the hang of it). The most recent I tried is not.
Geoff the Medio wrote:Depending how you "switched over" to a different version, possibly there are incompatible script files being found in the resources or user settings directories.
Sounds like Mat has it.
Last edited by defaultuser on Sun Oct 29, 2017 5:59 am, edited 2 times in total.

defaultuser
Vacuum Dragon
Posts: 583
Joined: Wed Aug 26, 2015 6:15 pm

Re: Parse error in saved ship files

#5 Post by defaultuser » Sun Oct 29, 2017 5:57 am

MatGB wrote:Ah, um, the problem here is having used the most recent test version to see if it works then going back to one that's less buggy on the machine isn't expected behaviour, the ship savegame backend has been redesigned substantially to allow for reordering and similarly useful stuff so a UUID has been added to each design.

This is done automatically on first load of a new version and it converts all old saved designs to the new format.

But if you go back to an older version (for reasons discussed in other threads), then it won't know what the new stuff is doing. If they're still loading and usable it's probably nothing to worry about.
Ok, I did try a newer version for purposes of testing the screen flicker and mouse problems. Sounds like that caused it. It's not hurting anything. If I delete the "focs.txt" files and restart, I imagine that it will clear the problem. Not that it was causing any real problem, just something I noted.

Post Reply