FAILURE TO LOAD GAME!

BadWolfGames
12 Aug 2018, 22:03

I am trying to test out a prototype of a game I am creating, but it won't let me run the game. This is the message it shows when I try to run the game,
Failed to Load Game.
The following errors occurred:
Error: Error adding script attribute 'script' to element 'OutputTextRaw': Function not found:
'RequestSpeak'

If anyone could help, that would be great! :)


Anonynn
12 Aug 2018, 22:09

Hm. From just taking a quick look at what you wrote...

I think it might have something to do with your object attribute not being set to "script".

And if you have just

RequestSpeak

^ in a script like that, Quest is going to think it's a Function.

Hope that helps a little! We may need to see the code. If there's a bracket error or an error in a Function, Quest won't load a game.

Anonynn.


mrangel
12 Aug 2018, 22:24

@Anonynn
Nope; it's not user error. This is an error in the released version of Quest 5.8

The function OutputTextRaw() (which is a built-in function, defined in the library CoreOutput.aslx) now calls RequestSpeak() to cause text to be spoken if text-to-speech is turned on.

But… RequestSpeak() is in the library CoreFunctions.aslx, which is not available to gamebooks.

@BadWolfGames

I can suggest a solution, but it's kind of ugly.
Basically, you need to create a function named RequestSpeak, which takes a single parameter, s. The function body should be request (Speak, s).

I've not tested this, but that's what the missing function in the text-adventure version of the library is.


Anonynn
12 Aug 2018, 22:29

I apologize...I'm still a newb, I guess. Sigh.

Hope the issue gets worked out though!

Anonynn.


BadWolfGames
13 Aug 2018, 00:19

Is this problem for the desktop version or is it all versions, even web?


mrangel
13 Aug 2018, 08:04

All versions.
In the case of the online player, it will affect gamebooks published with Quest 5.8

Does my 'fix' seem to work?


mooney1012
13 Aug 2018, 18:56

I have been working with the online version and testing it and never had a problem. Now, as mentioned above, this problem has developed with my game. Why create this problem? Is a fix in the works? As for the possible fix mentioned above I just saw this and haven't tried it. Frankly I haven't created any functions yet so that is new to me.


jmnevil54
13 Aug 2018, 18:58

I can't play my game recently. Online version. I've published it several times.


The_Cat_Master_
17 Aug 2018, 02:57

@mrangel

Just tested your "fix." It works like a charm. You've assisted me greatly, I thank you. Just one problem, possibly unrelated, when I try to make a Character Creation start:

msg ("Let's generate a character.")
player.alias = result
GetInput() {
msg ("Hi, " + player.alias)
}

When I try to play the game, an error occurs:

Error running script: Error compiling expression 'result': Unknown object or variable 'result'

I realized it was a String, so I put quotation marks around "result," and I was disappointed to see "Hi, result" ('result' being the player.alias). How do I fix this?

Thanks in advance,

Cat


hegemonkhan
17 Aug 2018, 06:50

@ the cat master:

you got the lines switched up...


you wrongly got:

msg ("Let's generate a character.")

player.alias = result

GetInput () {

  msg ("Hi, " + player.alias)

}

when it's suppose to be:

msg ("Let's generate a character.")

GetInput () {

  player.alias = result

  msg ("Hi, " + player.alias)

}

when it's suppose to be (same as the above, but it has my comment line, explaining how the 'get input / GetInput' works):

msg ("Let's generate a character.")

GetInput () {

  // automatically (hidden from you), quest for the 'get input / GetInput' (and also for some other Scripts/Functions too, like the 'show menu / ShowMenu' and 'ask / Ask' Scripts/Functions: result = "YOUR_MENU_SELECTED_INPUT") sets the 'result' String Variable VARIABLE:

  // result = "YOUR_TYPED_IN_INPUT"

  player.alias = result

  // essentially, you doing this:

  // A = B = C
  // A = C

  // player.alias = result = "YOUR_TYPED_IN_INPUT"
  // player.alias = "YOUR_TYPED_IN_INPUT"

  // player.alias <=== result <=== "YOUR_TYPED_IN_INPUT"
  // player.alias <=== "YOUR_TYPED_IN_INPUT"

  msg ("Hi, " + player.alias)

}

the 'get input / GetInput' is what stores your typed-in input into the 'result' Variable VARIABLE

by having the 'player.alias=result' before/above (and outside of) the 'get input / GetInput', you got the 'result' Variable VARIABLE with no Value stored in it... and since there's no Value stored int the 'result' Variable VARIABLE, you got nothing to store into the 'alias' String Attribute, and hence the ERROR (it occurs on the 'result' Variable VARIABLE not having a Value stored in it, which is before its operation to store that into the 'alias' String attribute) ...


Jamie Furlong
19 Aug 2018, 10:47

Hi,

I've just created my first html gamebook but I'm getting the same error, even before I've done anything. I'm not really understanding the work-around.

I've called the function under 'game' by selecting 'call function' and entering 's' in the parameter. When I check the code it says 'RequestSpeak (s)'. What is meant by the 'function body' being 'request (Speak, s)'?

If I run the game doing the above my error message is now:
Error: Error adding script attribute 'roomenter' to element 'game': Function not found: 'RequestSpeak'

I'm not sure if I've actually created the function or just tried to call it without creating it.

Any assistance appreciated, thanks.


mrangel
19 Aug 2018, 12:25

The error is that the function is being called without being created. So you need to create it; calling it again will not help.

Here's some step-by-step images from the web version; it's probably pretty similar on the desktop version.

  1. Click on 'functions' in the navigation tree

  2. Click 'add'

  3. Enter the name 'RequestSpeak' and press OK

  4. Click the 'add' button for parameters

  5. Enter the name 's' and press OK

  6. Click on 'code view' (the following steps are only necessary if you want your game to work with speech turned on)

  7. Enter the code 'request (Speak, s)' and press OK

  8. If your screen looks like this, the bug should be fixed

Jamie Furlong
20 Aug 2018, 00:14

Hi mrangel, thanks so much for this. Your solution allows me to run the game but it is displaying

Error running script: Error compiling expression 's': Unknown object or variable 's'

on the top of every page. Is this expected and just a suggested workaround until this is fixed or should it not be displaying this?


mrangel
20 Aug 2018, 10:01

That shouldn't be happening, and especially not at the start of every page.

Have you got any references to a variable called s in your roomenter script?


Jamie Furlong
20 Aug 2018, 10:51

Hi again. I've moved back to the desktop Quest so I've binned the HTML project. I can still test this if you need me to. Can you tell me where I would find the roomenter script?


mrangel
20 Aug 2018, 13:42

In your previous post, you said:

I've called the function under 'game' by selecting 'call function' and entering 's' in the parameter.

That's the roomenter script attribute. If that line is still there, it would cause the latest error you reported.


Jamie Furlong
22 Aug 2018, 01:28

[edit] Sorry, I meant 'functions', not game. I've put the RequestSpeak function within 'functions' but I still get this error message.


mrangel
22 Aug 2018, 08:01

From the error messages you posted earlier, it looks like you put ResuestSpeak (s) in the 'script' tab of the 'game' element, before I gave a more detailed explanation of where to put the function.

The latest error message is what I would expect if you didn't remove that first attempt.

I could be wrong, but if it's happening at the start of every page, I'm pretty sure that the problem will be somewhere on the 'game' element. Take a look and see if there's any code there that could be causing it?


Jamie Furlong
22 Aug 2018, 10:08

Yep, got it in one! I'd forgotten to remove it from the game element. shakes head in embarrassment


Mega_Mewthree
24 Aug 2018, 15:40

Does anyone have any idea when the new version where the bug is actually fixed comes out?


The Pixie
28 Aug 2018, 07:09

I have uploaded a new version of the desktop that should sort this (will need to be downloaded and installed of course). I am still waiting for the on-line version to get updated; not sure when that will be.