inputManager.pauseForMore freezes game using WebUI

Hi,

I’m developing a game using the web UI for TADS 3 (v. 3.1.3, using workbench on windows 10), and I want to pause the game after displaying a ‘view instructions’ message at the beginning. However, when I put the “inputManager.pauseForMore(true);” method in, the game freezes completely - I’m not sure why. I’m using the ‘timesys’ extension, not sure if that is the problem or something else. Here’s the part of the code that seems to cause the problem:

showIntro() 

{
"If this is your first time playing this type of game, or you
are not sure of what to do, type ‘INSTRUCTIONS’ at the prompt.
You can use this commmand to view the instructions menu at any
time during the game.

";
inputManager.pauseForMore(true);
}
initialPlayerChar = me

;

New to TADS 3, and can’t figure this out, so any help would be appreciated.

Using inputManager.pauseForMore(true) is fine in web play, but it is not possible to use this function in showIntro(). I quickly digged into javascript code and probably you can’t use pauseForMore before the command prompt is displayed for the first time.

Thanks for looking, my knowledge of javascript is minimal so I wouldn’t have been able to figure that out -

I found and adapted a snippet of code which seemed to work from within showIntro(). There may be better ways to do this, but I’ll post it here anyway in case it’s useful to anyone:

showIntro()
{
"If this is your first time playing this type of game, or you
are not sure of what to do, type ‘INSTRUCTIONS’ at the prompt.
You can use this commmand to view the instructions menu at any
time during the game.

";

do {
“<.inputline>”;
"Press any key to continue. ";
“<./inputline>”;
inputManager.getInputLine(nil, nil);
} while (nil);
cls();}
}

initialPlayerChar = me

;

I’ve used it in that way (text - clearing the screen, waiting for keystroke - text …) and it works fine:

showIntro()    {
   "Display some text ... <p>";
   inputKey(); //wait for input
   cls();          // clear the screen
   "Display another text ... <p>";
}

inputline waits for a whole line closed with return, doesn’t it?

To those releasing their games using the WebUI, don’t use inputKey. That will just freeze the public Web server.
Always use the inputManager equivalent instead. In this case, inputManager.getKey(nil,nil).