FAILURE TO LOAD GAME!

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! :)


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.


@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.


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

Hope the issue gets worked out though!

Anonynn.


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


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

Does my 'fix' seem to work?


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.


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


@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


@ 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) ...


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.


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

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?


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?


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?


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.


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


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?


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


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


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.


Log in to post a reply.

Support

Forums