Non-existant command "selectable_if"

Hello. The noob coding thread appears to be closed…

anyway, I’m getting an error and cannot work out what is going wrong. I get the following error:

“Non-existant command '‘selectable_if’”

when camp_prison & camp_medic are both set to 1. If either is set to 0 then I do not get the issue. Basically I want the choice to be greyed out once the variables camp_prison & camp_medic are both set to 1. The choice works fine before both variables are set to 1.

Could anyone shed some light, this is one fragment of a larger choice tree.

*selectable_if ((camp_prison = 0) or (camp_medic = 0)) #Wander aimlessly around the camp.
        *rand camp_enq 1 100
        You wander aimlessly around the camp looking for anything important.
        *set camp_inv + 1
        *if (camp_enq < ((Per * scrutiny) + 30)) and (camp_prison < 1)
            *set camp_prison 1
            You notice what looks like a prison enclosure just outside the camp proper.
            *goto investigate_camp
        *elseif (camp_enq < ((Per * scrutiny) + 40)) and (camp_medic < 1)
            *set camp_medic 1
            You notice a some strange sounds from the Medicae tents.
            *goto investigate_camp
            Your search turns up nothing of interest. Solaria looks bored.
            *goto investigate_camp

any help appreciated

Strange, selectable_if should work normally in both *choice and *fake_choice sub sets…

Ummm can you post all the choices Branch’s for we to see?

1 Like

Ok, I have fixed it - it was an incorrect/confusing error message in choicescript/CIDE, it seems triggered by a different bug elsewhere in the choice tree: I had missed out a *goto at the end of a particular choice path elsewhere in the tree and for some reason instead of spitting out the “illegal to fall out of a choice &c” error, I was getting the above error.

strange, but thanks! (this thread can close, I solved my own problem like a boss!)

1 Like

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