Strange bug from *fake_choice


#1

I’m having trouble with *fake_choice. Perhaps I misunderstood what *fake_choice - I thought it was exactly like *choice except it doesn’t force you to use a *goto immediately after. Or maybe the error is unrelated.

I was writing a simple scene where the player has a sports match and can choose between three different strategies. Each will succeed if the target stat is high enough, a simple and easy conditional. And yet I keep getting an error in randomtest that quicktest does not seem to notice.

sports line 261: Invalid expression, couldn't extract another token: #Strategy 3

For some reason, it’s only the second iteration of ‘strategy 3’ that sets this off. I’ve tried it with different randomtest seeds and in the compiled game file as well, but I have no idea what is causing this frustrating error! Any ideas, forum?

Relevant code segment below.

The game of [spoiler redacted] looks like it'll be interesting. As the coach starts matching teams of three against each other, you think of several possible strategies. You settle on an idea and tell your team that you should ...
*fake_choice
  *if (strength > 25) #Strategy 1
    *temp strat 1
  *if (intuition > 25) #Strategy 2
    *temp strat 2
  *if (focus > 25) #Strategy 3
    *temp strat 3
  *if (strength <= 25) #Strategy 1
    *temp strat 4
  *if (intuition <= 25) #Strategy 2
    *temp strat 5
  *if (focus <= 25) #Strategy 3
    *temp strat 6

*if strat <= 3
  *goto gamewin
*else
  *goto gamelose

#2

It only does it if focus equals more than 25?

Edit: I believe it’s a problem with your formatting. Give this a try

The game of [spoiler redacted] looks like it'll be interesting. As the coach starts matching teams of three against each other, you think of several possible strategies. You settle on an idea and tell your team that you should ...

*fake_choice
    *if (strength > 25) 
        #Strategy 1
            *temp strat 1
    *if (intuition > 25) 
        #Strategy 2
            *temp strat 2
    *if (focus > 25) 
        #Strategy 3
            *temp strat 3
    *if (strength <= 25) 
        #Strategy 1
            *temp strat 4
    *if (intuition <= 25) 
        #Strategy 2
            *temp strat 5
    *if (focus <= 25) 
        #Strategy 3
            *temp strat 6

*if strat <= 3
    *goto gamewin
*else
    *goto gamelose

#3

That worked, thanks. A mod could close this topic with no objection from me should such a person be so inclined.


#4