*selectable_if not

Sorry, I’m tired. Checked wiki, forum and tutorial… might have missed something

Could someone please link me to something that says whether a variant of *selectable_if not works?

Current error message: path_who_are_you line 243: Couldn’t parse the line after *selectable_if: not (mara = “Panda”)

  *selectable_if not (mara = "Dormouse") 
    #…trying to beat my last cast; I want to toss a rock clear to the other side of the bridge this time.
      It is exhilarating to stand so close to oblivion, twirling and spinning, then launching a pebble as far as you can out into the void.

There are several other spirit animals, and I’d prefer not to have to list them all whenever I use this. So not:

*selectable_if (((mara = "Courser") or (mara = "Wolf")) or (mara = "Panda") 

and so on for the other animals.

How about

*selectable_if (mara != “Dormouse”)

Does that work?

If not then If | ChoiceScript Wiki | Fandom says

N.B: *If not (var) will work correctly only if this check occupies a line of its own. For example, in the following code the ‘not’ will be completely ignored and would actually display that #Option text if (var) is in fact true:

It might be the same problem happening for selectable if?

1 Like

Hmm never seen that. Thanks for the suggestion.

Error message now reads:
path_who_are_you line 243: Couldn’t parse the line after *selectable_if: not (mara != “Panda”)

So appears not to

EDIT:
Still catching up with your edit - I believe it is on a different line, as suggested

  *selectable_if not (mara != "Dormouse") 
    #…trying to beat my last cast; I want to toss a rock clear to the other side of the bridge this time.
      It is exhilarating to stand so close to oblivion, twirling and spinning, then launching a pebble as far as you can out into the void.

Does the *selectable_if (mara=“panda”) work?

(Normally I’d be using the ide to work this out but it doesn’t work anymore) :frowning:

1 Like

What if you remove the space after not? Like selectable_if not(mara = "Dormouse")

1 Like

No…

Error message:
path_who_are_you line 243: Couldn’t parse the line after *selectable_if: (mara=“Panda”)

Does

*selectable_if not (mara = “Dormouse”) #…trying to beat my last cast; I want to toss a rock clear to the other side of the bridge this time.

work? With the # on the same line?

1 Like

Apparently not

Error message:
path_who_are_you line 243: Couldn’t parse the line after *selectable_if: not(mara = “Panda”)

Nope, darn it :smirk:

Error message:

path_who_are_you line 243: Couldn’t parse the line after *selectable_if: not(mara = “Panda”) #…the sounds of the air gusting close, and of the water running furlongs below.

But it does work with the ‘not’ taken out.

Is it the hyphen after selectable_if, perhaps?

2 Likes

Ah no! The editor discovers my shame (having returned to chapter 1 when I should be working on sections further ahead… eek)

Stupid question:

@Fiogan to which hyphen are you referring?

1 Like

Does ( *selectable_if not ) not work with *fake_choice?

*fake_choice
  *selectable_if not (mara = "Panda") #…the sounds of the air gusting close, and of the water running furlongs below.
    You chase the sounds of all the life around you, whistling after them and spinning their cadences with your voice. You catch at the bright filled twirls of the birdsongs; your notes rise up to greet them.  

    Do they listen, the birds?
    *set AA_1146 "Began enjoying songs and the sound of the world around you"
    *set edge 0
    *set earlyideal "song"
    *set marapanda + 1
  *selectable_if not (mara = "Scylla") #…family and relationships, both those lost in the past and those hoped for in your future.
    You wish that you could remember your mother and your father. Are they still out there somewhere? And if they are, do they think about you too?
    *set AA_1146 "Began thinking more about family and relationships, both past and future"
    *set edge 1
    *set earlyideal "family"
    *set maracourser + 1  
  *selectable_if not (mara = "Wolf") #…boys, mainly.
    You curl your feet and wiggle your bare toes, wondering whether the boys find them pretty. Getting older, you've discovered that if you twirl your hair in your fingers when boys speak to you, it distracts them. You like to catch them open-mouthed as you twist a lock in your hand.
    *set AA_1146 "Began thinking more about boys, attractiveness and fooling around"
    *set edge 2
    *set likes "boys"
    *set earlyideal "the less fair sex"
    *set marascylla + 1
  *selectable_if not (mara = "Wolf") #…girls, mainly.
    You ball your fists and examine your knuckles. The seneschal has thick hair on his; you're unsure whether that's an advantage in attracting girls.
    *set AA_1146 "Began thinking more about girls, attractiveness and fooling around"
    *set edge 3
    *set likes "girls"
    *set earlyideal "the fairer sex"
    *set marascylla + 1
  *selectable_if not (mara = "Courser") #…whether I really am alone, sitting here underneath this watchful blue sky."
    Your lessons teach of gods, but you can see more spirit in the dancing flocks of swallows and in the not-quite voices of the wind.
    *set AA_1146 "Began thinking more about spirituality and the world around yourself"
    *set edge 4
    *set earlyideal "spirituality"
    *set maradormouse + 1
  *selectable_if not (mara = "Dormouse") #…trying to beat my last cast; I want to toss a rock clear to the other side of the bridge this time.
    It is exhilarating to stand so close to oblivion, twirling and spinning, then launching a pebble as far as you can out into the void.
    *set AA_1146 "Began seeking excitement and testing your boundaries and abilities"
    *set edge 5
    *set earlyideal "excitement"
    *set maracourser + 1
  #[i]Return.[/i]
    *goto_scene page_turner

This works for me but only if it’s the second option in a choice tree.

*fake_choice
    #Choice1
        Blah
    *selectable_if   (mara != "panda")  #…trying to beat my last cast; I want to toss a rock clear to the other side of the bridge this time.
        It is exhilarating to stand so close to oblivion, twirling and spinning, then launching a pebble as far as you can out into the void.
2 Likes

Sorry! I meant the colon after *selectable_if. Here’s to typing whilst distracted; the editor, too, has shame (:

2 Likes

Oooh, was sure that would work

Error:
path_who_are_you line 245: Couldn’t parse the line after *selectable_if: (mara != “Panda”)

(PS @fiogan - there isn’t a colon in the code - I think it’s reading the selectable_if as the command without the not)

*fake_choice
  #[i]Return.[/i]
    *goto_scene page_turner
  *selectable_if (mara != "Panda") 
    #…the sounds of the air gusting close, and of the water running furlongs below.
      You chase the sounds of all the life around you, whistling after them and spinning their cadences with your voice. You catch at the bright filled twirls of the birdsongs; your notes rise up to greet them.  

      Do they listen, the birds?
      *set AA_1146 "Began enjoying songs and the sound of the world around you"
      *set edge 0
      *set earlyideal "song"
      *set marapanda + 1
      *goto page_5
  *selectable_if (mara != "Scylla") 
    #…family and relationships, both those lost in the past and those hoped for in your future.
      You wish that you could remember your mother and your father. Are they still out there somewhere? And if they are, do they think about you too?
      *set AA_1146 "Began thinking more about family and relationships, both past and future"
      *set edge 1
      *set earlyideal "family"
      *set maracourser + 1  
      *goto page_5
  *selectable_if (mara != "Wolf") 
    #…boys, mainly.
      You curl your feet and wiggle your bare toes, wondering whether the boys find them pretty. Getting older, you've discovered that if you twirl your hair in your fingers when boys speak to you, it distracts them. You like to catch them open-mouthed as you twist a lock in your hand.
      *set AA_1146 "Began thinking more about boys, attractiveness and fooling around"
      *set edge 2
      *set likes "boys"
      *set earlyideal "the less fair sex"
      *set marascylla + 1
      *goto page_5
  *selectable_if (mara != "Wolf") 
    #…girls, mainly.
      You ball your fists and examine your knuckles. The seneschal has thick hair on his; you're unsure whether that's an advantage in attracting girls.
      *set AA_1146 "Began thinking more about girls, attractiveness and fooling around"
      *set edge 3
      *set likes "girls"
      *set earlyideal "the fairer sex"
      *set marascylla + 1
      *goto page_5
  *selectable_if (mara != "Courser") 
    #…whether I really am alone, sitting here underneath this watchful blue sky."
      Your lessons teach of gods, but you can see more spirit in the dancing flocks of swallows and in the not-quite voices of the wind.
      *set AA_1146 "Began thinking more about spirituality and the world around yourself"
      *set edge 4
      *set earlyideal "spirituality"
      *set maradormouse + 1
      *goto page_5
  *selectable_if (mara != "Dormouse") 
    #…trying to beat my last cast; I want to toss a rock clear to the other side of the bridge this time.
      It is exhilarating to stand so close to oblivion, twirling and spinning, then launching a pebble as far as you can out into the void.
      *set AA_1146 "Began seeking excitement and testing your boundaries and abilities"
      *set edge 5
      *set earlyideal "excitement"
      *set maracourser + 1
      *goto page_5


EDIT:

amended so selectable_if not was the second choice in the choice tree

… and (ahem) took out the ‘nots’ accidentally left in from previous iteration

1 Like

If you use != like @FairyGodfeather suggested , it’s a negative (does not equal), so then you don’t need the ‘not’.

2 Likes

ahh ninja’d

just noticed I’d left in the nots from a previous iteration. The above message is up to date now

still broken. like my heart

Try the choices in-line with the selectable_if?

3 Likes

Just use ifs instead of selectable ifs.

2 Likes

Wah ! ! !

This worked - new error messages later in the story! So happy…

Thank you @Fiogan and @FairyGodfeather
Alliterative heroes!

(love that Fairy gave up before the final hurdle… hehe :wink:)

1 Like