Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

If elseif statement error

Hello, I'm using SugarCube 2.14.0 on version Twine 2.1.1

I'm having trouble with variables, conditionals and macros, i believe those are the right terms. I am trying to make a game were you can make a choice and it changes your appearance and interactions with characters, I am going to add pictures later in the game but right now I'm going with pure text. My problem is that it doesn't seem to want to read the gender selection right. i will upload pictures of my problem.

Comments

  • It's usually better to post code rather than images.

    Anyway, you should be setting your variables to a type of value, like a number, a string, or a boolean. Looking at your images, you're probably looking for strings.

    Place the values, like Male, in quotes to make them strings, i.e.
    <<set $gender to "Male">>
    
    <<if $gender is "Male">>
    
Sign In or Register to comment.