06-21-2011 03:14 AM - edited 03-14-2019 08:07 AM
Hi,
I'm modifying one of our scripts, and I want to have a main menu prompt play which also plays a message saying 'to hear these options again press star' - but to only play that last little bit once.
However, I can't get the expression editor to play nice!
I have a boolean variable set up in the script called PlayedListenAgain. I also have the prompts set as Prompts.
I added this script to the prompt expression for the menu:
{
if (PlayedListenAgain == true)
Prompt promptMainMenu;
else
Prompt promptMainMenu + promptHearOptionsAgain;
PlayedListenAgain = true;
}
But it just errors saying "Unable to parse expression; promptMainMenu is already defined (line: 3, col:3).
Now, I'm well aware of this, I defined it! I'm not trying to redefine it, so I'm going a little nutty here.
Any help gratefully received!
Solved! Go to Solution.
06-21-2011 03:33 AM
Try this:
{
if (PlayedListenAgain == true)
return promptMainMenu;
else
PlayedListenAgain = true;
return promptMainMenu + promptHearOptionsAgain;
}
06-21-2011 03:33 AM
Try this:
{
if (PlayedListenAgain == true)
return promptMainMenu;
else
PlayedListenAgain = true;
return promptMainMenu + promptHearOptionsAgain;
}
06-21-2011 03:37 AM
Johnathan, you are a star!
Thankyou, sir. That worked!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide