*selectable_if not a command

I got a error saying that '*selectable_if is not a command when I know (or think) it is.

It works with all my code except this one

*choice
  *selectable_if (time > 9) #Eat.
   *set time -10
   *set food -1
   *goto eat

However *selectable_if works in this line of code

  *selectable_if (time > 4) #Talk to your ${caretaker}.
   *set time -10
   *goto talk

I have copied pasted it from the working code and checked for misspellings I’ve also created an additional #option to *label eat and that code works fine.

I don’t know if you copy/pasted the code, as you say, it really looks like it should work as you have shown it.

If you rewrote the line here instead of copy/paste, I would just double check that there are spaces between the *selectable_if and the () and then #. That has messed up things for me sometimes, because it doesn’t work proper if there are no spaces, and sometimes that can be hard to spot.

EDIT: Okay, just thought of another thing. Try renaming your ‘time’ variable to something else (like timetime or something) and see if the error remains.

2 Likes

I copied and pasted it.
And I tried your suggestion I’m still getting the error about selectable if

Screenshot_2019-07-15_002945

Can you post the full context of the code without breaks? It makes it easier to find a problem with the code if everything regarding the scene Is present.


"Go and get your food ${Name} before its time for you to leave". You grab a plate and reached for the food closest to you.
You currently have nothing on your plate.

*choice
  #Bacon.
   *set bacon "bacon"
   *set food +1
   *goto ko2

  #Eggs.
   *set eggs "eggs"
   *set food +1
   *goto ko2

  #Grits.
   *set grits "grits"
   *set food +1
   *goto ko2

  #Sausage.
   *set sausage "sausage"
   *set food +1
   *goto ko2

  #Your not hungry.
   *goto ko3

*label ko2

You currently have ${eggs},${bacon},${grits},${sausage} on your plate.

*choice
  *selectable_if (bacon = "") #Bacon.
   *set bacon "bacon"
   *set food +1
   *goto ko2

  *selectable_if (eggs = "") #Eggs.
   *set eggs "eggs"
   *set food +1
   *goto ko2

  *selectable_if (Grits = "") #Grits.
   *set grits "grits"
   *set food +1
   *goto ko2

  *selectable_if (Sausage = "") #Sausage.
   *set sausage "sausage"
   *set food +1
   *goto ko2

  #Thats all I want on my plate.
   *goto ko3

*label ko3

You decide that you didn't want anything to eat. You sit down and look at your family.
*if (underwear = false)
 and you probaly know you made them uncomfortable, since they all know your not wearing undergarments.

*label tick
Sudenly you are lifted up into the air and put on the table before the assailant launching a full tickling attack from all sides.

Who was the assailant?

*choice
  #Aunt
   Your aunt took care you since your mother died.
   *set Aun true
   *set caretaker "aunt"
   *goto ko4

  #Uncle
   Your uncle took care of you since your mother died.
   *set Uncl true
   *set caretaker "uncle"
   *goto ko4

*label ko4

Your ${caretaker} sits you down laughing "are you ready for school, mi amore?

*choice

  #Yeah, I think so.
   *goto ko5

  #No, not really.
   *goto ko5

*label ko5
Starting time: 30 min.

You quickly sit at the table ready to eat. You'll have to balance eating your food and talking to your family. If you leave any food on your plate your ${caretaker} might get mad at you.
*if (time = 10)
 You have ten minutes to get to school!

*choice
  *selectable_if (time > 9) #Eat.
   *set time -10
   *set food -1

  *selectable_if (time > 4) #Talk to your ${caretaker}.
   *set time -5

  #Go to school
   *goto check

Does that help @LeoXII

Why don’t you try making the variables Boolean?

Also I don’t see where the set for the time variable is.

The set is right under the question I changed timetime back to time because it didn’t make a difference I don’t know how to use Boolean

I don’t know what I did but now selectable_if doesn’t work at all in my code, if I have a guess I think whatever happened to the other *selectable_if happened to the rest of them but the code looks the same

I eventually solved the issue and I feel stupid because the solution was so simple. So earlier I set a limit of *selectable_if (I don’t remember why there was a limit until I remembered ) and the limit was supposed to be on time that way after a certain amount of times coded, time wasn’t usable anymore that way I didn’t use it more times than necessary.

I thank all the people who tried to help me with this issue. And I won’t respond to this issue any longer.

Uhmm…
Just a general tip for anyone reading this: never disable or delete your variables; don’t ever use *delete command.

Unused, redundant variables are fine. You should only delete your variables only if your game takes too much memory space (I’m talking like 100MB), which should never be the case for any CS games.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.