Q5.8 Save Conflicts with Old Request Save?

I just encountered this problem while testing my Snazzy Side Nav Menu, but decided to start a new topic for this issue.

I'm experiencing strange errors while saving my game. Quest behaves as if it is saving, but when I reload the game, I can tell it is not the game that I just saved. I even got some strange error message about not being able to save that I've never seen before.

I'm thinking this is because, with some of my custom commands like autosave, quit and save, etc., I'm using the old request (RequestSave, "") script, but I noticed that the latest Quest 5.8 beta has a new default save command:

if (HasAttribute(game, "questplatform")) {
  if (game.questplatform = "desktop") {
    requestsave ()
  }
  else {
    JS.saveGame ()
  }
}
else {
  requestsave ()
}

The two different save methods must be in conflict. Should I change all my old request (RequestSave, "") scripts to HandleSingleCommand ("save")?

------------ (filler to allow me to repost) ----------------------------------------------------------------------+++++++++++++++++++++++++++++

Update: I just copied the new Q5.8 save command from the CoreCommandsLib into my game. When I look at it, it says "Failed to load script:" in a couple of places. requestsave () is in red when it should normally be in black. Now I'm not sure which save method is the problem?! Whiskey Tango Foxtrot?!


K.V.

Hello.

Which beta are you running? You want beta 4. The others had problems.

...and can you send me your code?


K.V.

The new save stuff is a change in the C# sharp code. There are a few changes in the C# code, so Quest 5.8 was changed to ASL version 580.

After Quest 5.8.0 beta3, Quest will check for the ASL version before it decides which scripts to run. So, if your ASL version is 550 and you're running 5.8.0 beta4, it will use the old scripts. This will suck if you are playing an .aslx file in the editor without changing the ASL version to 580 (this happens when you change something and Quest autosaves, or you can flip to code view and change it manually), because Quest will be using the stuff from the v580 core library, and that will not work with the v550 C# scripts it's running.

This may make us revised the default commands and functions which we've overridden, but it is necessary to keep the older games running. As long as you are playing a v550 .quest file, all of the old core libraries are packaged in your game, so everything works.


I'm not 100% sure the save script will behave differently between v550 and v580. I think it will, but Pixie did the save stuff, and I'm still trying to wrap my mind around it. It works for me in every game I have opened, though. New or old games. ...and I have lots of reqeuest instead of requestsave going on, too.

Wait... Have I tested SAVING those old games? (Be right back!)


K.V.

Testing notes (part 1)

I just added the 'save' command from 5.7.2 to a game I made with 5.8.0 beta4.

It saved and the save loaded and everything worked fine.


K.V.

Testing notes (part 2)

This is all in the editor from an .aslx file, except for the save files (which, of course, are not .aslx files and must be loaded in the player side).


I can't get it to throw an error. I changed the ASL version in my new game (made with Quest 5.8.0 beta4) to 550 and added 5.7.2's save command, then played and saved. The save file worked perfectly.

I played a 5.7.2 (version 550) game from the editor and saved. The save file worked again. Then, I added the old save command to it, and it worked again. Then, I changed it to 580 and it worked again. Then, I removed the old save command, and it worked again.

I can't think of any other way to approach it.


K.V.

NOTE: Games made in 5.8 beta will not work online at all until the new version is actually released and updated online!


EXCEPTION:

If you open a v550 game in Quest 5.8 beta4, then immediately publish it without changing anything, Quest will not change it to v580. If you modify anything in the GUI then press 'Play', Quest autosaves. When this happens, it rewrites the entire .aslx file, and it changes 550 to 580 when it does this.

If you click 'Save' from code view, it will not change the ASL version.

Make sure it's set to 580 if publishing from 5.8. But know that it won't work online just yet, and any version of Quest before 5.8 will not load it at all. It will throw an incorrect ASL version error. And, again, this is due to (good) changes in the C# sharp code, which is not packaged up with published games.


So:

When working on a game which I alone will be playing or editing, I'm using 5.8.

If I plan on sharing it in any way, shape, or form within the next month, I use 5.7.2.


K.V.

Don't ask me why, but when you copy the save command from 5.8 into your game, you have to change requestsave () to requestsave, otherwise it complains about a parameter.

NOTE: This only happens when the 'save' command is actually in your game's code (for some reason).


K.V.

GIF (Saving is CRAZY)


K.V.

Oddly, the command in CoreCommands does not have the parentheses, but Quest adds them to the .aslx file.

  <command name="save">
    <pattern type="string">^save$</pattern>
    <script>
      if (HasAttribute(game, "questplatform")) {
        if (game.questplatform = "desktop") {
          requestsave
        }
        else {
          JS.saveGame ()
        }
      }
      else {
        requestsave
      }
    </script>
  </command>

K.V.

GIF 2 (requestsave boogaloo)


K.V.

PS

I bet Pixie can fix this in less than 1 minute.


I never thought to copy the command into a game to see if it worked that way, and I bet no one else testing 5.8 (besides Dcoder) has done so, either.

Helluva catch, Dcoder!


K.V.

Pixie has corrected this in the source code on GitHub, so the next release will include the fix.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums