Problem Description
Loading game from game slot doesn't work.
Attach a Capx
https://www.dropbox.com/s/he70fvr0cbbp6 ... .capx?dl=0
Description of Capx
Layout1 - Starting layout
Layout2 - Save game layout
The starting layout is layout1. It has a single save game button that takes you to layout2. The text objects are hidden and will show up accordingly if the game either successfully loaded or failed to load.
Layout2 aka save game layout has a button to save the game to a slot named 'slot1'. The load button loads 'slot1'. Since Construct 2 only saves the layout currently in use, saving works by writing global number 'saveslot' to 1 and loading Layout1. Layout1 sheet then saves the game to 'slot1' if 'saveslot' is 1, resets the number back to zero and writes 1 to 'saved' global number which works as a failsafe and then gets back to Layout2. Back in Layout2, the 'saved' number is read and if 1, it assumes the save is successful and prints out "Did the saving work? 1" or alternatively "Did the saving work? 0" in the layout.
It does work this far.
Loading is made in the same sense. Global number 'loadslot' is used and checked in the first layout to load the game. Global number 'loaded' works as a failsafe.
Steps to Reproduce Bug
- Step 1: In Layout1, click 'save game'
- Step 2: Click 'save to slot1'
- Step 3: Click 'load from slot1'
Observed Result
Loading save slot flicks to Layout1 and then back to Layout2. "Did the saving work?" says 1, after saving, meaning it should've saved in the slot. "Did the loading work?" says 0, meaning the game didn't even read the sheet before throwing back to Layout2.
Expected Result
Layout1 should've successfully loaded from the save slot, with the text "LOAD SUCCESSFUL!" visible.
Affected Browsers
- Chrome: YES
- FireFox: YES
- Internet Explorer: YES
- Edge: YES
Operating System and Service Pack
Windows 10
Construct 2 Version ID
Release 239