# \>then relationship correct format

**URL:** <https://forum.choiceofgames.com/t/then-relationship-correct-format/139240>\
**Category:** ChoiceScript Help\
**Created:** [July 5, 2023, 6:02pm UTC](https://forum.choiceofgames.com/t/then-relationship-correct-format/139240 "2023-07-05T18:02:27Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArchivistAlpha096](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/archivistalpha096/32/203655_2.png) [@ArchivistAlpha096](https://forum.choiceofgames.com/u/ArchivistAlpha096)\
**Post date:** [July 5, 2023, 6:02pm UTC](https://forum.choiceofgames.com/t/then-relationship-correct-format/139240/1 "2023-07-05T18:02:27Z")

</div>

So, I’m having trouble with testing relationships that are grater than other relationships, as in, the game is through up errors when I try to run it.  
Currently, I am using this format:

```plaintext
*if (relationship) >relationship

```

What would be the correct format in this situation?

Anyway, I hope that all of you who read this have a good rest of your day.

---

<div class="post-metadata">

**Author:** ![dreamofeden](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/dreamofeden/32/184326_2.png) [@dreamofeden](https://forum.choiceofgames.com/u/dreamofeden)\
**Post date:** [July 5, 2023, 6:04pm UTC](https://forum.choiceofgames.com/t/then-relationship-correct-format/139240/2 "2023-07-05T18:04:25Z")

</div>

```plaintext
*if (relationship1 > relationship2)

```

should work. What is your exact error? Are you sure that you’ve created both variables ahead of time? And set them to numerical values?

For each relationship, you should have a  
`*create relationship 0`  
in the start up (0 can be replaced with whatever the starting relationship value is)

EDIT: the statement you have _should_ work, it would never run because you’re checking if “relationship” is greater than itself, which it will never be, but it shouldn’t error.

---

<div class="post-metadata">

**Author:** ![ArchivistAlpha096](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/archivistalpha096/32/203655_2.png) [@ArchivistAlpha096](https://forum.choiceofgames.com/u/ArchivistAlpha096)\
**Post date:** [July 5, 2023, 7:33pm UTC](https://forum.choiceofgames.com/t/then-relationship-correct-format/139240/3 "2023-07-05T19:33:30Z")

</div>

Currently, when I run the game, the error is:

```plaintext
First_day line 122: not a number: false.

```

No idea why it’s doing that, although the exact values I have are:

```plaintext
*if (t_relationship > n_relationship)

```

---

<div class="post-metadata">

**Author:** ![dreamofeden](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/dreamofeden/32/184326_2.png) [@dreamofeden](https://forum.choiceofgames.com/u/dreamofeden)\
**Post date:** [July 5, 2023, 8:08pm UTC](https://forum.choiceofgames.com/t/then-relationship-correct-format/139240/4 "2023-07-05T20:08:53Z")

</div>

Do you have the code for where you set t\_relationship and n\_relationship? If you’re getting not a number errors, the problem is likely earlier on in the code.

---

<div class="post-metadata">

**Author:** ![Phantmwolf](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/phantmwolf/32/147922_2.png) [@Phantmwolf](https://forum.choiceofgames.com/u/Phantmwolf)\
**Post date:** [July 5, 2023, 8:33pm UTC](https://forum.choiceofgames.com/t/then-relationship-correct-format/139240/5 "2023-07-05T20:33:13Z")

</div>

The error code it’s giving you means that one of the variables is set to false instead of a number.

---

<div class="post-metadata">

**Author:** ![ArchivistAlpha096](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/archivistalpha096/32/203655_2.png) [@ArchivistAlpha096](https://forum.choiceofgames.com/u/ArchivistAlpha096)\
**Post date:** [July 6, 2023, 1:34pm UTC](https://forum.choiceofgames.com/t/then-relationship-correct-format/139240/6 "2023-07-06T13:34:41Z")

</div>

Currently, my code looks like this:

```plaintext
*create t_relationship 50
*create l_relationship 50
*create n_relationship 50
*create d_relationship 50

```

I’ve also got them a little further down, although just for variable testing:

```plaintext
*set t_relationship 50
*set l_relationship 50
*set n_relationship 50
*set d_relationship 50

```

---

<div class="post-metadata">

**Author:** ![ArchivistAlpha096](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/archivistalpha096/32/203655_2.png) [@ArchivistAlpha096](https://forum.choiceofgames.com/u/ArchivistAlpha096)\
**Post date:** [July 7, 2023, 2:18pm UTC](https://forum.choiceofgames.com/t/then-relationship-correct-format/139240/7 "2023-07-07T14:18:35Z")

</div>

So, yeah. Don’t know what’s going on, since you said above that the reason this is happening is because one of my variables is set to false instead of a number, but as I copied the code from my startup into the post that you see, well.

---

<div class="post-metadata">

**Author:** ![Sinnie](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@Sinnie](https://forum.choiceofgames.com/u/Sinnie)\
**Post date:** [July 7, 2023, 2:30pm UTC](https://forum.choiceofgames.com/t/then-relationship-correct-format/139240/8 "2023-07-07T14:30:02Z")

</div>

Print out the values of both variables before the if statement is called. Play the game and see what value each is set to.

Once you know for sure what the value is, then you can find out where it is going wrong.

You can also search for the variables to double check every place they are used

---

<div class="post-metadata">

**Author:** ![dreamofeden](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/dreamofeden/32/184326_2.png) [@dreamofeden](https://forum.choiceofgames.com/u/dreamofeden)\
**Post date:** [July 7, 2023, 4:14pm UTC](https://forum.choiceofgames.com/t/then-relationship-correct-format/139240/9 "2023-07-07T16:14:41Z")

</div>

Yeah sorry, without any more information, not sure what the fix is.

Based solely on the info you’ve given, it _should_ work. You’ve likely modified a variable somewhere and made a mistake there.

---

<div class="post-metadata">

**Author:** ![ArchivistAlpha096](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/archivistalpha096/32/203655_2.png) [@ArchivistAlpha096](https://forum.choiceofgames.com/u/ArchivistAlpha096)\
**Post date:** [July 8, 2023, 7:47pm UTC](https://forum.choiceofgames.com/t/then-relationship-correct-format/139240/10 "2023-07-08T19:47:32Z")

</div>

Think I fixed it, I forgot that I put some of the relationships as binary variables by mistake, just saw that now and corrected it, so that shouldn’t pop up anymore. Also learned how to print out relationships, so thanks for that, smily.

Really though, thanks for all your help on trying to fix this as it has been very much so annoying me for the last two days or so.
