Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backwards compatibility is broken for epidemics #33

Open
sadger opened this issue Sep 1, 2014 · 6 comments
Open

Backwards compatibility is broken for epidemics #33

sadger opened this issue Sep 1, 2014 · 6 comments
Labels
Milestone

Comments

@sadger
Copy link
Owner

sadger commented Sep 1, 2014

I have had a few random crashes with missing variables for old saves. It should be an easy fix just putting this here so I can document any findings and so I can tick it off when it's done.

@sadger sadger added the Bug label Sep 1, 2014
@sadger
Copy link
Owner Author

sadger commented Sep 1, 2014

@MarkL1961 I think it's due if you have a save file version 81 the onLoad function in hospital.lua only checks for version less than 81 so it's not executed. Do you think we should move the save version on a count and check for <82 I think this should solve my problem.

@MarkL1961
Copy link
Collaborator

You need to see what the current save number is in app.lua, then increase that by one and use that for any afterloads you have. So if at 85 now then change to 86 and then in your afterloads it is if <86 then do this.
Most files have an after load function and you add to those

@sadger
Copy link
Owner Author

sadger commented Sep 2, 2014

Ok I will do that and I think that should fix most of the backward compatibility issues.

@MarkL1961
Copy link
Collaborator

It'll be where ever you have added new values that the game would normally take from the start and does not otherwise pick up during game play. If you want any help I can take a look at weekend and see if you have missed anything

@sadger
Copy link
Owner Author

sadger commented Sep 2, 2014

I'll have another check and make sure about the variables and test some old saves out. I think it's just a matter of making sure that every save up to 81 loads the new onLoad stuff

@MarkL1961 MarkL1961 modified the milestone: High Sep 9, 2014
@sadger
Copy link
Owner Author

sadger commented Sep 11, 2014

Incremented the save version in 9bc8e61 in order to fix backward compatibility. Seems to have worked but needs testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants