Help with greater than variable

Hello all,

I don’t know what I’m doing wrong.

So I made a brand new story just to test the code. I made a StoryCaption with Strength = $strength to give me the current control.

On my first passage I have [[You work out and gain some strength|Page 2][$strength += 5]]

On my next passage I have

[[You work out some more and get stronger.|Page 3][$strength += 5]]

[[You decide not to work out anymore|Page 3]]

My last passage is

<<if $strength is gte 10>>You are able to pick up the bag.<>You are not strong enough to pick up the bag<>

This is what i get.

Error: <>: bad conditional expression in <> clause: Unexpected token ‘>=’

First of all you can write your code inside the </> button right up to the textbox area. If you choose to do so, people will be able to copy and paste.

As for your trouble, it seems like you try to use two operators: is and gte with your <<if>><</if>> macro.
The following should work:

<<if $strength gte 10>>You are able to pick up the bag.<<else>>You are not strong enough to pick up the bag<</if>>
2 Likes