Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Bug? "or" statement not working properly

I was working on a test today, and ended up with this file. Everything works fine, save for the "emphatic" mood, which shows up as a negative mood instead of a positive one.

I can't find the mistake, but I noticed it is the last "positive" mood. Could that be the problem?

Comments

  • edited June 2015
    I believe there's a precedence problem is the current release which requires you to wrap each sub-expression in parenthesis. Also, using the it keyword would cut down on typing. Finally, you don't need to repeat the same (if:) simply to set something, you can output text and use (set:) within the same (if:).

    For example:
    (if: ($loveremotion is "comfortable") or (it is "relaxed") or (it is "peaceful") or (it is "eager") or (it is "lively") or (it is "enthusiastic") or (it is "positive") or (it is "fascinated") or (it is "inspired") or (it is "compassionate") or (it is "emphatic"))[pleased to see you(set: $love to it + 1)](else:)[not ready to meet with someone else].
    

  • Your code is a lot better and shorter. It works just fine, but with the same problem than before:

    "empathic" is grouped with the positive emotions, but shows up as a negative one. It will be followed by "not ready" and not add one to "love" variable. I would just leave it there and forget about it, but players will be annoyed by it when they play, since you can visite that page several times.

  • edited June 2015
    You have a misspelling. You're using "empathic" in your (either:) and "emphatic" in your (if:).

    Also, I couldn't find anything in the changelog about a precedence problem, so maybe I imaged that one. If so, you could get rid of the extra parenthesis then.
  • Ah, me and my bad english. It was misspelled, and surely that was causing the error. Thank you.
Sign In or Register to comment.