Requesting an if Code Check

It’s late/early and I’m tired so I’m definitely reading something wrong but

*choice *if (((background = "Alchemist") and (amalia >= 50)) and (friends = true)) #Your parents looked as if their worst fears had come true when you told them what had happened. Your friends were isolated from you when they told their parents of your abilities, though they still managed to sneak you messages. *goto todo *if (((background = "Alchemist") and (amalia <= 49)) and (friends = true)) #Your parents looked as if their worst fears had come true when you told them what had happened. Your friends were isolated from you when they told their parents of your abilities, and whenever you saw them in the windows they glared at you full of disgust. *goto todo *if ((background = "Alchemist") and (friends = false)) #Your parents looked as if their worst fears had come true when you told them what had happened. *goto todo *if (((background = "Noble") (amalia >=50)) and (friends = true)) #Your parents looked ill when you told them what happened. Your friends were isolated from you, though they still found ways to sneak messages to you. *goto todo *if (((background = "Noble") (amalia <= 49)) and (friends = true)) #Your parents looked ill when you told them what happened. Your friends were isolated from you, and whenever you saw them in the windows they glared at you full of disgust. *goto todo *if ((background = "Noble") and(friends = false)) #Your parents looked ill when you told them what happened. *goto todo *if (((background = "Peasant") (amalia <= 49)) and (friends = true)) #Your parents looked ill when you told them what happened. Your friends were isolated from you, though they still found ways to sneak messages to you. *goto todo *if (((background = "Peasant") (amalia >=50)) and (friends = true)) #Your parents looked ill when you told them what happened. Your friends were isolated from you, though they still found ways to sneak messages to you. *goto todo *if ((background = "Peasant") and(friends = false)) #Your parents looked ill when you told them what happened. *goto todo

This didn’t start until I added in the (friends = false) bit for peasant and noble so I’m really confused

chapter1 line 13: Invalid expression at char 26, expected OPERATOR, was: OPEN_PARENTHESIS [(]

From a glance it looks like you’re missing a few ands and a space on two lines. Not sure what the #s are for, a new feature? Try this;

*choice *if (((background = "Alchemist") and (amalia >= 50)) and (friends = true)) #Your parents looked as if their worst fears had come true when you told them what had happened. Your friends were isolated from you when they told their parents of your abilities, though they still managed to sneak you messages. *goto todo *if (((background = "Alchemist") and (amalia <= 49)) and (friends = true)) #Your parents looked as if their worst fears had come true when you told them what had happened. Your friends were isolated from you when they told their parents of your abilities, and whenever you saw them in the windows they glared at you full of disgust. *goto todo *if ((background = "Alchemist") and (friends = false)) #Your parents looked as if their worst fears had come true when you told them what had happened. *goto todo *if (((background = "Noble") and (amalia >=50)) and (friends = true)) #Your parents looked ill when you told them what happened. Your friends were isolated from you, though they still found ways to sneak messages to you. *goto todo *if (((background = "Noble") and (amalia <= 49)) and (friends = true)) #Your parents looked ill when you told them what happened. Your friends were isolated from you, and whenever you saw them in the windows they glared at you full of disgust. *goto todo *if ((background = "Noble") and (friends = false)) #Your parents looked ill when you told them what happened. *goto todo *if (((background = "Peasant") and (amalia <= 49)) and (friends = true)) #Your parents looked ill when you told them what happened. Your friends were isolated from you, though they still found ways to sneak messages to you. *goto todo *if (((background = "Peasant") and (amalia >=50)) and (friends = true)) #Your parents looked ill when you told them what happened. Your friends were isolated from you, though they still found ways to sneak messages to you. *goto todo *if ((background = "Peasant") and (friends = false)) #Your parents looked ill when you told them what happened. *goto todo

1 Like

You could try splitting up the sentences, it would reduce the code a bit.

You could try something like:

*if background = "Alchemist"
  Your parents looked as if their worst fears had come true when you told them what happened.
*if (background = "Noble") or (background = "Peasant")
  Your parents looked ill when you told them what happened.
*if friends = true
  Your friends were isolated from you
  *if background = "alchemist" 
    when they told their parents of your abilities, 
  *if amalia >49
    though they still found ways to sneak messages to you.
  *if amalia < 50 
    and whenever you saw them in the windows they glared at you full of disgust.
1 Like

wish I knew coding but of course i am Going to TCTC for web design

TCTC "Trumbull County Technical Career center