Ultimate Noob Coding

could you share a snippet of the code

Sorry, it says that I can’t upload media items in a post.

new users can’t upload images, so I would suggest copy and pasting the code

*choice
#Unease
The stark uniformity of the tents and the impassive looks of the soldiers around them fill you with fear. You will become one of them, someday, just another uniform floating around wherever ordered. Is it really worth it?
*finish
#Indifference
It’s just a bunch of cloth tents. You don’t really feel any particular way about it. If this is where you have to be for the foreseeable future, so be it. At least you aren’t being thrown directly into the wilds.
*finish
#Excitement
It’s a new stage in your life, one wildly different from your fairly mundane background. At the very least, you’ll get to see different parts of the world and meet new people, so what about that isn’t to love? Well…aside from the mosquitoes.
*finish
#Happiness
You’re just happy to be involved in something like this, to be honest. Something bigger than yourself, some great undertaking that your generation will be known for. You aren’t being left behind, and you’ll carve out your name in the annals of history. That’s the hope, anyways.
*finish


Screenshot 2024-06-01 10.50.17 PM
So it shouldve looked like this

code

*choice
    #Unease
        The stark uniformity of the tents and the impassive looks of the soldiers around them fill you with fear. You will become one of them, someday, just another uniform floating around wherever ordered. Is it really worth it?
        *finish
    #Indifference
        It’s just a bunch of cloth tents. You don’t really feel any particular way about it. If this is where you have to be for the foreseeable future, so be it. At least you aren’t being thrown directly into the wilds.
        *finish
    #Excitement
        It’s a new stage in your life, one wildly different from your fairly mundane background. At the very least, you’ll get to see different parts of the world and meet new people, so what about that isn’t to love? Well…aside from the mosquitoes.
        *finish
    #Happiness
        You’re just happy to be involved in something like this, to be honest. Something bigger than yourself, some great undertaking that your generation will be known for. You aren’t being left behind, and you’ll carve out your name in the annals of history. That’s the hope, anyways.
        *finish

Can I ask how this is different to what I was doing before?

basically indentation

The code I shared with you was through CSIDE which is why it looked weird. I’m not sure I understand the change, though. I pressed tab once for the actual decision text (IE Unease, Excitement, etc) and tab twice for the text under it. Is that not how it’s supposed to go?

Your code may have had correct indentation, but your post didn’t show it; you’ll need to put ``` at the beginning and end of your code for the forum to show it correctly.

I’m back, but with a different issue. CSIDE is giving me a problem saying "Couldn’t parse text after *selectable_if (charmchosen = false). Code to follow. Am I doing something wrong with formatting again?

   *selectable_if (charmchosen = false) 
  #Your ability to communicate and convince others of your position.
    You feel as if you've become much more in tune with people after having been around so many for so long. Even the simple act of being around people as they interact with each other has given you some insight as to what makes people tick and how you can manipulate that to your advantage.
    *set Charm %+20
    *goto_scene transit1```

Been a long time since I wrote any code. Pretty sure the choice itself (#) needs to be on the same line as the selectable if.

The error is saying it is trying to parse text after it, presumably because it doesnt recognise the # as a choice

1 Like

Attempted, and it did not resolve the issue.

indentation looks off
*selectable_if (charmchosen = false) 
    #Your ability to communicate and convince others of your position.
        You feel as if you've become much more in tune with people after having been around so many for so long. Even the simple act of being around people as they interact with each other has given you some insight as to what makes people tick and how you can manipulate that to your advantage.
        *set Charm %+20
        *goto_scene transit1

That also did not work.

just realized what I did, though… the fix should basically what Sinnie said, assuming you have the variables and everything declared properly
Screenshot 2024-06-11 6.21.10 PM

Screenshot 2024-06-11 6.27.16 PM

code

what i have in startup

*create charmchosen false

I assume you have the choices which sets it to either true or false


*choice
    *selectable_if (charmchosen = false) #Your ability to communicate and convince others of your position.
     You feel as if you've become much more in tune with people after having been around so many for so long. Even the simple act of being around people as they interact with each other has given you some insight as to what makes people tick and how you can manipulate that to your advantage.
     *set Charm %+20
     *goto test 

and well just change the goto back to the scene youre trying to go to, changed it as i was testing

help

Selectable if | ChoiceScript Wiki | Fandom

It’s still giving me the “couldn’t parse line” error even after directly copying what you put down. I also did have choices that set it to true or false, that was the decision before this one.

weird, I’m using the web version, so I’m unsure if that has anything to do with it, maybe someone else could chip in

You appear to be missing the (*choice / *fake_choice) commands at the beginning. I ran this through CSIDE and it worked (hopefully I formatted it correctly in the forum post)

*fake_choice
    *selectable_if (charmchosen = false) #Your ability to communicate and convince others of your position.
        You feel as if you've become much more in tune with people after having been around so many for so long. Even the simple act of being around people as they interact with each other has given you some insight as to what makes people tick and how you can manipulate that to your advantage.
         *set Charm %+20
         *goto_scene transit1```

There is a choice command there, I just didn’t include it. That’s my bad.

    *selectable_if (charmchosen = false) #Your ability to communicate and convince others of your position.
     You feel as if you've become much more in tune with people after having been around so many for so long. Even the simple act of being around people as they interact with each other has given you some insight as to what makes people tick and how you can manipulate that to your advantage.
     *set Charm %+20
     *goto transit1```
1 Like

Strange, this appears to run fine in CSIDE.

*choice
    *selectable_if (charmchosen = false) #Your ability to communicate and convince others of your position.
        You feel as if you've become much more in tune with people after having been around so many for so long. Even the simple act of being around people as they interact with each other has given you some insight as to what makes people tick and how you can manipulate that to your advantage.
        *set Charm %+20
        *goto_scene transit1```

Aside from running both quicktest and randomtest, try double checking your indentation above, sometimes that catches me out.