Error with an *elseif statement


#1

Hi there! Normally I would try to solve this myself and not bother anyone with it, but I just can’t seem to figure this one out, so I thought I’d ask for outside help on this one. I have an *elseif statement in one of my scenes that is being flat-out ignored whenever I play-test it, and I can’t quite figure out why. I’ve checked the indentation several times, double-checked examples from my earlier chapters to make sure I wrote out the statements right, and everything else I can think of. However, the *elseif statement is still being ignored, (which will inadvertently lock the player out of an entire avenue of conversation.)

I’ll post every relevant block of code and the associated text that I can think of, however, it’s practically a wall of text and code, so if you’d rather not dig through that for me, I’d understand. However, if anyone could read through this and fish out the problem, I’d really appreciate it.

Summary
*if (B3 <= 55)
  "No." B3 responds flatly. You blink, waiting for it to elaborate. When you don't recieve one, you can't help but feel a twinge of frustration building
  up. "Well, why not?" You return, trying to keep your voice even.

  "Because I don't trust you." B3 responds just as matter-of-factly as before. "I do not intend to share such important information with someone I cannot
  trust will use it well. I require you to trust me as I trust you: one step at a time. I hope that proves to be acceptable, until a time arrises where
  we can trust each other more suitably.
  *line_break
  *line_break
  *if (Rebellion > 50)
    You let out an exasperated sigh, your frustration slowly rising. You briefly consider dragging the machine to the tech department and having them
    pry open its head for information, but frankly, that would just be a waste of time. Perhaps it would be best to move on to another topic.
    *goto B3_conversation
  *elseif (Rebellion < 50)
    You respond with a sympathetic nod. While it might be frustrating not to recieve any information, you know that if the roles were reversed, you would
    likely respond with the same amount of secrecy and caution. For now, it would be best to move on to another topic.
    *goto B3_conversation
  *elseif (Rebellion = 50)
    You respond with a non-commital nod. You can vaguely understand why the machine would do this, but the frustration slowly bubbling inside of you says
    otherwise. You shake off both feelings, finding yourself in a rather neutral stance on the situation. Perhaps it would be best if you moved on to another
    topic for the time being.
    *goto B3_conversation
*elseif (B3 > 55)
  The question hangs in the air for a short time. B3 quietly stares at you, as if trying to figure out how to respond. You wait silently for some form
  of response, and just as the silence begins to feel unbearable, one is finally provided.

  "I do not believe that would be wise. I would hope you do not take this as an insult, but that information is quite important to me, and while I hold
  some respect for you, I am unsure if I can truly trust you. I would not wish to provide this information to someone that would not use it well. Perhaps
  when more trust has been built, we can speak more of this."
  *line_break
  *line_break
  *if (Rebellion > 50)
    You let out an exasperated sigh, your frustration slowly rising. You briefly consider dragging the machine to the tech department and having them
    pry open its head for information, but frankly, that would just be a waste of time. Perhaps it would be best to move on to another topic.
    *goto B3_conversation
  *elseif (Rebellion < 50)
    You respond with a sympathetic nod. While it might be frustrating not to recieve any information, you know that if the roles were reversed, you would
    likely respond with the same amount of secrecy and caution. For now, it would be best to move on to another topic.
    *goto B3_conversation
  *elseif (Rebellion = 50)
    You respond with a non-commital nod. You can vaguely understand why the machine would do this, but the frustration slowly bubbling inside of you says
    otherwise. You shake off both feelings, finding yourself in a rather neutral stance on the situation. Perhaps it would be best if you moved on to another
    topic for the time being.
    *goto B3_conversation
*elseif (B3 >= 65)
  The question hangs in the air for a short time. B3 quietly stares at you, as if trying to figure out how to respond. You wait silently for some form
  of response, and just as the silence begins to feel unbearable, one is finally provided in the form of a single word.

  "Why?"
  *choice
    #"I want to learn more about you and where you came from."
      "Oh?" B3 tilts its head quizically. "I suppose I should be flattered that you care so much about learning who I am." It stays silent for a moment or two, before finally responding with a reluctant
      nod. "Very well. I trust you. Please, ask whatever you wish to know and I will answer to the best of my abilities."
      *set B3 +2
      *goto culture_questions
    #"If I know more about your people, it might make some sort of diplomacy possible."
      B3 nods in agreement to your answer. "I see. That is a noble thought, and one that I hope proves to come true. Please, ask whatever it is you wish to know, and I will answer to the best of my
      abilities."
      *set B3 +3
      *goto culture_questions
    #"If I know more about your people, we could use it to our advantage."
      "I see." B3 responds non-comittaly, though you can tell its monotone seems a touch thicker than usual. "That is a practical thought, if nothing else. I suppose I must commend you for it. Ask what
      you wish to know, and I will make attempts to answer."
      *set B3 -3
      *goto culture_questions
    #"I'm just curious."
      "Oh?" B3 tits its head, watching you quizically. "I cannot fault you for holding some curiosity. If you wish answers to your questions, I will offer them to the best of my ability."
      *goto culture_questions

((In this instance, the *elseif (B3 >= 65) is the one being ignored here.))


#2

It’s because (B3 > 55) encompasses every number above 55…including 65 and above.

So you could change that *elseif to

*elseif ((B3 > 55) and (B3 < 65))

And then the last part, *if (B3 >= 65) can just be:

*else

It functions as a catch-all for anything that’s not met by the other conditions.


#3

Alright, thanks for your help! I just finished playtesting and the scene works now. :grinning: