Click here to Skip to main content
14,926,139 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
So, I was making this fun code for myself. It's a storyboard code, which is basically a story that changes based on your choices. Can someone help me please?

C
// Christopher Tillack

// Reminder: This code is for a storyboard. A storyboard is a story that lets you makes choices, and changes based on your choices.

#include <stdio.h>

int main(void) 
   {
int characterName;
   char characterName[100];
   int aa;
   printf("Hello. This code will write a story, based on your choice.\n");
   printf("What is the name of your character?\n");
   scanf("%s",characterName);
   printf("Your name is %s",characterName);
   printf("\n");
   printf("One day, while walking through a forest, you encounter a mysterious, entrancing portal. Do you enter it %s", characterName);
   printf("?\n");
   printf("Enter Number 1 to Stay, Number 2 for Entering it.\n");
   scanf("%i",&aa);
  if (aa == 1);
   {
   printf("You chose to stay. END OF STORY.");
   }
 if (aa == 2)  
   {
     printf("You step towards the bright, purple portal.\n It looks like a swirly mirror. You are entranced as you step forward, step after step. Adventures await you.");
   }
   return 0;


What I have tried:

I tried to change the scanf. It didn't work.
Posted
Updated 21-Mar-21 21:11pm
v2

1 solution

How many times do you have to be told to learn the language and try fixing even trivial things yourself?

This is what? The thirteenth, and you still haven't learned a single thing.
   
Comments
Dave Kreskowiak 21-Mar-21 16:40pm
   
The final kick was applied.
OriginalGriff 21-Mar-21 18:30pm
   
Alas, poor Yorick! I knew him, Horatio, a fellow of infinite jest, of most excellent fancy. He hath borne me on his back a thousand times, and now, how abhorred in my imagination it is! My gorge rises at it. Here hung those copy'n'paste errors that I have sighed at I know not how oft.
Dave Kreskowiak 21-Mar-21 18:49pm
   
:laugh:
W Balboos, GHB 22-Mar-21 7:49am
   
You have obviously missed your calling - time for that career change?

If not Shakespearean theater, perhaps kiddy show host?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900