Hello I am having some trouble with creating my if statements I am trying to make it so that the further you get into the story the more information shows up in your glossary.
So essentially what I am doing is after chapter 1 you gain some “streetwise” (you start of at 0)
My stats page looks like this:
*choice
#Glossery
*if streetwise < 10
less than 10 streewise
*finish
*elseif ((streetwise > 10) or (streetwise < 15))
This is to test streetwise between the numbers 10 to 15
*finish
*elseif ((streetwise > 15) or (streetwise < 25))
This is to test streewise between numbers 15 and 25...
*finish
*elseif ((streetwise > 25) or (streetwise < 35))
This is to test streewise between numbers 25 and 35...
*finish
*elseif ((streetwise > 35) or (streewise < 50))
This is to test streewise between numbers 35 and 50...
*finish
*elseif ((streetwise > 50) or (streewise < 70))
This is to test streewise between numbers 50 and 70...
*finish
The problem I am having is that after testing all the numbers I only get to the second elseif statement. What am I doing wrong?
*finish
You’re using OR instead of AND
1 Like
What FairyGodfeather said.
Also, you should use this instead of what you have, because the player would have no choices at 10, 15, 25, 35 and 50 streetwise.
*choice
#Glossary
*if streetwise < 10
less than 10 streewise
*finish
*elseif ((streetwise > 9) and (streetwise < 15))
This is to test streetwise between the numbers 10 to 14
*finish
*elseif ((streetwise > 14) and (streetwise < 25))
This is to test streewise between numbers 15 and 24...
*finish
*elseif ((streetwise > 24) and (streetwise < 35))
This is to test streewise between numbers 25 and 34...
*finish
*elseif ((streetwise > 34) and (streewise < 50))
This is to test streewise between numbers 35 and 49...
*finish
*elseif ((streetwise > 49) and (streewise < 71))
This is to test streewise between numbers 50 and 70...
*finish
Edit: @FairyGodfeather - Fixed.
The problem I see here is the fact that these conditions can overlap eachother (10 to 15 and 15 to 25, both have the number 15), but I’m sure LadyKuonji gets it
1 Like
You can also use >= or <= instead. But either way works.
(Nothing to see here.)
@ballmot and @FairyGodfeather
Thank you so much for your help! After I changed the coding around (to fit what was shown) I was able to get it to work.
Again thank you so much!
2 Likes