Choicescript unable to parse *selectable_if magic>5 #exclusive option?

Hi guys,

Writing my first write-your-own adventure, and I thought I’d be smart and put a variable in to one of my choices. The code I’m trying to put into my adventure looks like this;

Blahblahblah what do you want to do?

*choice
 *selectable_if magic >5#Option only available to people who've earned at least %+5 in the game
  blahblahblag
 #option 2
   etc etc

An error message keeps coming up that the code is ‘unparse-able’ and I’m wondering if there is an alternate option to this code? Do I have to use the true/false stats to make this work? : / I thought this would be easier for me.

Thanks!

  • Aglet

From the looks of it it only needs some brackets, so that’d be

*choice
    *selectable_if (magic > 5)#Etc
        something
    #Option 2
        etc etc

Lack of brackets messes up things very often

1 Like

I tried that and the error screen still went “computer says nooooo” =P
The brackets made little to no difference D:

I had a lot of trouble with the *selectable_if 's in the past too. Does it still say the same thing?

If you mean by “unable to parse” either the phrase in question or the phrase after…? That’s what keeps coming up for me and I really liked the theory of that code D’:

Aha, found it. There has to be a space between the last bracket and the hash-tag like this:

*choice
    *selectable_if (magic > 5) #Etc
        something
        *page_break
    #Option 2
        etc etc
        *page_break
2 Likes

OH MY GOSH IT WOOOOORRRRKKKEDDDD
I officially love you 5ever. Thankyou so much!
: D

1 Like

Whenever an error like this pops up it’s usually just some stupid mistake :sweat_smile:
You’ll get used to it :stuck_out_tongue_winking_eye:

AAHHH!! I am getting the same error and can’t figure it out…!!! DX HELLP!!!

Ok here it is:

*fake_choice
  #option 1
    blah blah
  #2
    blah blah
  *selectable_if (LR) #You suggested that Larth did. 
    Larth seemed a bit surprised but took it anyway. 
    It didn't take long till he got his first fish.     

    "WHAT!" Mop exclaimed. "No way! Look at that wiggling fish!" 
    Larth held it up and Mop poked it giggling.
    *goto poll
*label poll 

and this is what is says: Error: night_four line 465: Couldn’t parse the line after *selectable_if: LR #You suggested that Larth did.
… someone help plz :((

can a *fake_choice be used for that?? i changed it so maybe that helped but idk yet…

Yes a fake choice can be used for that.

Pasting your code into the IDE, with a “*create lr true” at the top, it works fine.

Hmm… idk why quicktest kept saying that error then… so it’s all fine??

No idea. If there’s an error it’s not in what you pasted here.

The only part I didn’t past were the first two options since they were very long…
But so far, quicktest stopped giving the error… though I only changed it to a *choice not *fake_choice…hmm… idk… maybe it’s good now.
thanks for checking for me!

IIRC, the way *fake_choice works was changed (before you couldn’t do a lot of things with it). It’s a possibility that it’s a hold over from that, but that’s only a guess.

Oh can you tell more about about that??? Cuz I am also running into problems with *fake_choice command. I just want to make sure I am using it correctly.

Here is another error I’m getting:
Error: night_five line 227: It is illegal to fall out of a *choice statement; you must *goto or *finish before the end of the indented block.

But It’s a *fake_choice I am using not *choice

EDIT… I just looked over my code and there is a *fake_choice inside another one… I think that’s the problem…

If you can provide a link to all of the code you’re having problems with, instead of just a small snippet, we can probably tell you what the problem is. I don’t actually think it’s because you’re using fake_choice instead of choice. I think it’s something else which you may have accidentally fixed when changing the commands.

That illegal to fall out error is caused because you have either a *choice, or an *else/elseif and no *goto or finish

ok thanks! how do give that kind of link?

Where do you host your games? Do you have a dropbox account?

I do but haven’t put any of my games on there yet