</code></pre></div><h3id="fixoldsave"tabindex="-1">fixOldSave <aclass="header-anchor"href="#fixoldsave"aria-hidden="true">#</a></h3><ul><li>Type: <code>(oldVersion: string | undefined, player: Partial<PlayerData>) => void</code></li></ul><p>This function will be run whenever a save is loaded that has a different version than the one in <ahref="./project-info.html#versionnumber">project info</a>. It will be given the old version number, and the player save data object currently being loaded.</p><p>The purpose of this function is to perform any necessary migrations, such as capping a resource that accidentally inflated in a previous version of the project. By default it will do nothing.</p></div></div><footerclass="page-footer"data-v-8fcebc32data-v-b65b4b36><divclass="edit"data-v-b65b4b36><divclass="edit-link"data-v-b65b4b36data-v-55695e90><aclass="link"href="https://github.com/profectus-engine/profectus-docs/edit/main/guide/project-entry.md"target="_blank"rel="noopener noreferrer"data-v-55695e90>Edit this page on GitHub <svgclass="icon outbound icon"xmlns="http://www.w3.org/2000/svg"aria-hidden="true"x="0px"y="0px"viewbox="0 0 100 100"width="15"height="15"data-v-55695e90><pathfill="currentColor"d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygonfill="currentColor"points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><divclass="updated"data-v-b65b4b36><!----></div></footer><divclass="next-and-prev-link"data-v-8fcebc32data-v-e65a9748><divclass="container"data-v-e65a9748><divclass="prev"data-v-e65a9748><aclass="link"href="/guide/project-info"data-v-e65a9748><svgxmlns="http://www.w3.org/2000/svg"viewbox="0 0 24 24"class="icon icon-prev"data-v-e65a9748><pathd="M19,11H7.4l5.3-5.3c0.4-0.4,0.4-1,0-1.4s-1-0.4-1.4,0l-7,7c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.2-0.1,0.5,0,0.8c0.1,0.1,0.1,0.2,0.2,0.3l7,7c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3c0.4-0.4,0.4-1,0-1.4L7.4,13H19c0.6,0,1-0.4,1-1S19.6,11,19,11z"></path></svg><spanclass="text"data-v-e65a9748>Project Info</span></a></div><divclass="next"data-v-e65a9748><aclass="link"href="/guide/changelog"data-v-e65a9748><spanclass="text"data-v-e65a9748>Changelog</span><svgxmlns="http://www.w3.org/2000/svg"viewbox="0 0 24 24"class="icon icon-next"data-v-e65a9748><pathd="M19.9,12.4c0.1-0.2,0.1-0.5,0-0.8c-0.1-0.1-0.1-0.2-0.2-0.3l-7-7c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l5.3,5.3H5c-0.6,0-1,0.4-1,1s0.4,1,1,1h11.6l-5.3,5.3c-0.4,0.4-0.4,1,0,1.4c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3l7-7C19.8,12.6,19.9,12.5,19.9,12.4z"></path></svg></a></div></div></div><!--[--><!--]--></div></main></div><!----><!--]--></div>