Invalid expression at char 28, expected CLOSE_PARENTHESIS, was: NAMED_OPERATOR [and]

This code is just a test, so I need help, that’s my first time using the *if and it is really difficult for me to figure it our with the wiki.

*choice
    *if ((first_feature = "none") and (second_feature = "none"))
      #Human
    *if ((first_feature = "pointed ears") and (second_feature = "scales"))
      #Dragonborn
    *if (first_feature = "horns" and second_feature = "claws")
      #Demon
    *if (first_feature = "claws" and second_feature = "tail")
      #Werewolf
    *if (first_feature = "antlers" and second_feature = "feathers")
      #Harpy
    *if (first_feature = "feathers" and second_feature = "tail")
      #Mermaid
    *if (first_feature = "fangs" and second_feature = "scales")
      #Vampire
    *if (first_feature = "animal ears" and second_feature = "tail")
      #Nymph
    *if (first_feature = "unusual skin tone" and second_feature = "feathers")
      #Fairy
    *if (first_feature = "fur" and second_feature = "claws")
      #Wendigo
    *if (first_feature = "pointed ears" and second_feature = "feathers")
      #Elf
    *if (first_feature = "claws" and second_feature = "unusual skin tone")
      #Orc
    *if (first_feature = "antlers" and second_feature = "fur")
      #Wendigo
    *if ((first_feature = "scales") and (second_feature = "feathers")
      #Dragonborn
    *if (first_feature = "tail" and second_feature = "unusual skin tone")
      #Djinn

This should be

*if ((first_feature = "scales") and (second_feature = "feathers"))
      #Dragonborn

You were missing a parentheses, let me know if it works.

1 Like

From what I can see, for the third *if statement and down you don’t have enough parentheses.

Here are the first two:

*choice
    *if ((first_feature = "none") and (second_feature = "none"))
      #Human
    *if ((first_feature = "pointed ears") and (second_feature = "scales"))
      #Dragonborn

After that, the rest of them are missing them. All but one of them has only one starting parenthesis, and you forgot to put them in the middle to separate the two variables. The ending parenthesis is also missing by one. So, if I got my lines right, it should look like the below:

*if ((first_feature = "horns") and (second_feature = "claws"))
  #Demon
*if ((first_feature = "claws") and (second_feature = "tail"))
  #Werewolf
*if ((first_feature = "antlers") and (second_feature = "feathers"))
  #Harpy
*if ((first_feature = "feathers") and (second_feature = "tail"))
  #Mermaid
*if ((first_feature = "fangs") and (second_feature = "scales"))
  #Vampire
*if ((first_feature = "animal ears") and (second_feature = "tail"))
  #Nymph
*if ((first_feature = "unusual skin tone") and (second_feature = "feathers"))
  #Fairy
*if ((first_feature = "fur") and (second_feature = "claws"))
  #Wendigo
*if ((first_feature = "pointed ears") and (second_feature = "feathers"))
  #Elf
*if ((first_feature = "claws") and (second_feature = "unusual skin tone"))
  #Orc
*if ((first_feature = "antlers") and (second_feature = "fur"))
  #Wendigo
*if ((first_feature = "scales") and (second_feature = "feathers"))
  #Dragonborn
*if ((first_feature = "tail") and (second_feature = "unusual skin tone"))
  #Djinn
1 Like

It work, thanks to you both ! But I have another issue…

*choice
    *if ((first_feature = "none") and (second_feature = "none"))
      #Human
    *if ((first_feature = "pointed ears") and (second_feature = "scales"))
      #Dragonborn
    *if ((first_feature = "horns") and (second_feature = "claws"))
      #Demon
    *if ((first_feature = "claws") and (second_feature = "tail"))
      #Werewolf
    *if ((first_feature = "antlers") and (second_feature = "feathers"))
      #Harpy
    *if ((first_feature = "feathers") and (second_feature = "tail"))
      #Mermaid
    *if ((first_feature = "fangs") and (second_feature = "scales"))
      #Vampire
    *if ((first_feature = "animal ears") and (second_feature = "tail"))
    #Nymph
    *if ((first_feature = "unusual skin tone") and (second_feature = "feathers"))
    #Fairy
    *if ((first_feature = "fur") and (second_feature = "claws"))
    #Wendigo
    *if ((first_feature = "pointed ears") and (second_feature = "feathers"))
    #Elf
    *if ((first_feature = "claws") and (second_feature = "unusual skin tone"))
    #Orc
    *if ((first_feature = "antlers") and (second_feature = "fur"))
    #Wendigo
    *if ((first_feature = "scales") and (second_feature = "feathers"))
    #Dragonborn
    *if ((first_feature = "tail") and (second_feature = "unusual skin tone"))
    #Djinn
    *if ((first_feature = "glowing aura") and (second_feature "unusual skin"))

It says “Error: startup line 1013: Invalid expression at char 68, expected OPERATOR or CLOSE_PARENTHESIS, was: STRING [“unusual skin”]”

You missed the =

#Djinn
    *if ((first_feature = "glowing aura") and (second_feature = "unusual skin"))
2 Likes

Oh thanks, I didn’t saw it ! How do I end the *if block ? Everything is working now !

*if blocks end with an *else, so in case none of the if checks out, there’s a way for the block to continue.