Minigame and points help!

So I’ve made a minigame in my story and the minigame’s function is to earn points with the love interest. There are three questions in the minigame and if the reader answers correctly, they earn one point with the love interest. The total amount of points out of 3 earned are shown once the game is completed.

At the end, there’s this function:

If (POTIONS MINIGAME = 0) {

@CILLIAN +0

readerMessage | bold, color:red | Cillian +0

} elif (POTIONS MINIGAME = 1) {

@CILLIAN +1

readerMessage | bold, color:green | Cillian +1

} elif (POTIONS MINIGAME = 2) {

@CILLIAN +2

readerMessage | bold, color:green | Cillian +2

} else {

@CILLIAN +3

readerMessage | bold, color:green | Cillian +3

}

Cillian is the love interest name.

POTIONS MINIGAME is the character I made so that when the score out of 3 is shown, it just shows the points earned from that minigame:

      NARRATOR
You got [5164423313293312]/3 correct.

The problem I’m having is that the points earned using POTIONS MINIGAME as the character, I want to convert to CILLIAN points. So I typed the code above, however it doesn’t seem to be working and it tells me there’s an error with an ‘Unexpected block end’.

Someone please help!!

Idk what it can be wrong, because I copied this script, I just changed to GAME and “if” but small “i” and I don’t have problem with it. So can you send screenshots of game and ending and error? Maybe somewhere else is something wrong.

Summary

if (GAME=0) {

@CILLIAN +0

readerMessage | bold, color:red | Cillian +0

} elif (GAME=1) {

@ELIJAH +1

readerMessage | bold, color:green | Cillian +1

} elif (GAME=2) {

@CILLIAN +2

readerMessage | bold, color:green | Cillian +2

} else {

@CILLIAN +3

readerMessage | bold, color:green | Cillian +3

}

Thank you for responding! I’ll send the code now

I’ve just decided to send the code of the minigame as well as the points thing at the end, rather than screenshots if you don’t mind :slight_smile:

I know it’s a lot of code, sorry but you can just copy and paste!

Also, don’t ask about the weird made-up words, I am writing a fantasy story :sweat_smile:

AUTUMN (think_rubchin)
(What was the first step?)

choice
“Dump 500ml Mushtoad urine into a glass beaker”{

@POTIONS MINIGAME +0

@speechbubble is 128 262 to 100% with tail_top_left

    AUTUMN (talk_think_neutral)
I think we need to dump 500ml of Mushtoad urine into a glass beaker.

&AUTUMN is idle_shiftweight_neutral_loop

@speechbubble is 164 280 to 100% with tail_top_right

    CILLIAN (talk_unsure)
Okay..

@CILLIAN spot 0.600 259 337 in zone 2 AND CILLIAN moves to layer 2 AND CILLIAN is tinker_kneel_neutral_loop

@pause for a beat

sound wrong_buzz

@cut to zone 3
@zoom on 946 221 to 260% in 0
@speechbubble is 163 285 to 100% with tail_top_right

    MR BERALD (talk_handsonhips_angry_loop)
Wrong! It's | bold | 300ml | reset | of Mushtoad urine.

@speechbubble is 151 285 to 100% with tail_top_right

    MR BERALD (talk_exhausted)
And you're supposed to | bold | pour | reset | it in, not dump it.
    MR BERALD (talk_sarcastic)
I assume you DON'T want pee splashed all over your school uniform.

&MR BERALD is idle

@cut to zone 2
@zoom on 608 220 to 248% in 0
@speechbubble is 137 261 to 100% with tail_top_left

&CILLIAN spot 0.600 259 277 in zone 2 AND CILLIAN moves to layer 1 AND AUTUMN moves to layer 2

@CILLIAN is react_facepalm_disappointed AND AUTUMN is idle_awkward_scratch_loop

    AUTUMN (talk_sheepish_rubneck)
Oops..

}
“Pour 300ml of Shufflewick saliva into a glass beaker”{

@POTIONS MINIGAME +0

@speechbubble is 128 262 to 100% with tail_top_left

    AUTUMN (talk_think_neutral)
I think we need to pour 300ml of Shufflewick saliva into a glass beaker.

&AUTUMN is idle_shiftweight_neutral_loop

@speechbubble is 164 280 to 100% with tail_top_right

    CILLIAN (talk_unsure)
Okay..

@CILLIAN spot 0.600 259 337 in zone 2 AND CILLIAN moves to layer 2 AND CILLIAN is tinker_kneel_neutral_loop

@pause for a beat

sound wrong_buzz

@cut to zone 3
@zoom on 946 221 to 260% in 0
@speechbubble is 163 285 to 100% with tail_top_right

    MR BERALD (talk_handsonhips_angry_loop)
Wrong! It's 300ml of | bold | Mushtoad urine | reset | .

&MR BERALD is idle

@cut to zone 2
@zoom on 608 220 to 248% in 0
@speechbubble is 137 261 to 100% with tail_top_left

&CILLIAN spot 0.600 259 277 in zone 2 AND CILLIAN moves to layer 1 AND AUTUMN moves to layer 2

@CILLIAN is react_facepalm_disappointed AND AUTUMN is idle_awkward_scratch_loop

    AUTUMN (talk_sheepish_rubneck)
Oops..

}
“Pour 300ml of Mushtoad urine into a glass beaker”{

@POTIONS MINIGAME +1

@speechbubble is 128 262 to 100% with tail_top_left

    AUTUMN (talk_think_neutral)
I think we need to pour 300ml of Mushtoad urine into a glass beaker.

&AUTUMN is idle_shiftweight_neutral_loop

@CILLIAN is listen_nod_neutral_loop

@CILLIAN spot 0.600 259 337 in zone 2 AND CILLIAN moves to layer 2 AND CILLIAN is tinker_kneel_neutral_loop

@pause for a beat

sound correct_ding

@cut to zone 3
@zoom on 946 221 to 260% in 0
@speechbubble is 172 285 to 100% with tail_top_right

&MR BERALD spot 0.730 259 201 in zone 3 AND MR BERALD moves to layer 7

    MR BERALD (talk_reassure_neutral)
That's right, well done!

&MR BERALD is idle

@cut to zone 2
@zoom on 608 220 to 248% in 0

&CILLIAN spot 0.600 259 277 in zone 2 AND CILLIAN moves to layer 1 AND AUTUMN moves to layer 2

@CILLIAN is react_pumpfist_happy AND AUTUMN is react_claphands_happy

}

&CILLIAN is idle_shiftweight_neutral_loop

&speechbubble is 137 263 to 100% with tail_top_left

    AUTUMN (think_rubchin)
(What is the next step?)

choice
“Squeeze three drops of goat butter hydroxide”{

@POTIONS MINIGAME +0

@speechbubble is 128 262 to 100% with tail_top_left

    AUTUMN (talk_think_neutral)
I think we need to squeeze three drops of goat butter peroxide.

&AUTUMN is idle_shiftweight_neutral_loop

@speechbubble is 164 280 to 100% with tail_top_right

    CILLIAN (talk_unsure)
Okay..

@CILLIAN spot 0.600 259 337 in zone 2 AND CILLIAN moves to layer 2 AND CILLIAN is tinker_kneel_neutral_loop

@pause for a beat

sound wrong_buzz

@cut to zone 3
@zoom on 946 221 to 260% in 0
@speechbubble is 163 285 to 100% with tail_top_right

    MR BERALD (talk_handsonhips_angry_loop)
Wrong! It's | bold | four | reset | drops of | bold | thorn butter hydroxide | reset |.

&MR BERALD is idle

@cut to zone 2
@zoom on 608 220 to 248% in 0
@speechbubble is 137 261 to 100% with tail_top_left

&CILLIAN spot 0.600 259 277 in zone 2 AND CILLIAN moves to layer 1 AND AUTUMN moves to layer 2

@CILLIAN is react_facepalm_disappointed AND AUTUMN is idle_awkward_scratch_loop

    AUTUMN (talk_sheepish_rubneck)
Oops..

}
“Squeeze four drops of thorn butter hydroxide”{

@POTIONS MINIGAME +1

@speechbubble is 128 262 to 100% with tail_top_left

    AUTUMN (talk_think_neutral)
I think we need to squeeze four drops of thorn butter hydroxide.

&AUTUMN is idle_shiftweight_neutral_loop

@CILLIAN is listen_nod_neutral_loop

@CILLIAN spot 0.600 259 337 in zone 2 AND CILLIAN moves to layer 2 AND CILLIAN is tinker_kneel_neutral_loop

@pause for a beat

sound correct_ding

@cut to zone 3
@zoom on 946 221 to 260% in 0
@speechbubble is 172 285 to 100% with tail_top_right

&MR BERALD spot 0.730 259 201 in zone 3 AND MR BERALD moves to layer 7

    MR BERALD (talk_reassure_neutral)
That's right, well done!

&MR BERALD is idle

@cut to zone 2
@zoom on 608 220 to 248% in 0

&CILLIAN spot 0.600 259 277 in zone 2 AND CILLIAN moves to layer 1 AND AUTUMN moves to layer 2

@CILLIAN is react_pumpfist_happy AND AUTUMN is react_claphands_happy

}
“Squeeze four drops of fern butter hydroxide”{

@POTIONS MINIGAME +0

@speechbubble is 128 262 to 100% with tail_top_left

    AUTUMN (talk_think_neutral)
I think we need to squeeze four drops of fern butter peroxide.

&AUTUMN is idle_shiftweight_neutral_loop

@speechbubble is 164 280 to 100% with tail_top_right

    CILLIAN (talk_unsure)
Okay..

@CILLIAN spot 0.600 259 337 in zone 2 AND CILLIAN moves to layer 2 AND CILLIAN is tinker_kneel_neutral_loop

@pause for a beat

sound wrong_buzz

@cut to zone 3
@zoom on 946 221 to 260% in 0
@speechbubble is 163 285 to 100% with tail_top_right

    MR BERALD (talk_handsonhips_angry_loop)
Wrong! It's four drops of | bold | thorn butter hydroxide | reset | .

&MR BERALD is idle

@cut to zone 2
@zoom on 608 220 to 248% in 0
@speechbubble is 137 261 to 100% with tail_top_left

&CILLIAN spot 0.600 259 277 in zone 2 AND CILLIAN moves to layer 1 AND AUTUMN moves to layer 2

@CILLIAN is react_facepalm_disappointed AND AUTUMN is idle_awkward_scratch_loop

    AUTUMN (talk_sheepish_rubneck)
Oops..

}

&CILLIAN is idle_shiftweight_neutral_loop

&speechbubble is 137 263 to 100% with tail_top_left

    AUTUMN (think_rubchin)
(What is the last step?)

choice
“Measure 16ml of Shufflewick saliva and mix for 30 seconds”{

@POTIONS MINIGAME +0

@speechbubble is 128 262 to 100% with tail_top_left

    AUTUMN (talk_think_neutral)
I think we need to measure 16ml of Shufflewick saliva and mix for 30 seconds.

&AUTUMN is idle_shiftweight_neutral_loop

@speechbubble is 164 280 to 100% with tail_top_right

    CILLIAN (talk_unsure)
Okay..

@CILLIAN spot 0.600 259 337 in zone 2 AND CILLIAN moves to layer 2 AND CILLIAN is tinker_kneel_neutral_loop

@pause for a beat

sound wrong_buzz

@cut to zone 3
@zoom on 946 221 to 260% in 0
@speechbubble is 163 285 to 100% with tail_top_right

    MR BERALD (talk_handsonhips_angry_loop)
Wrong! It's | bold | 17ml | reset | and | bold | stir | reset | for 30 seconds.

&MR BERALD is idle

@cut to zone 2
@zoom on 608 220 to 248% in 0
@speechbubble is 137 261 to 100% with tail_top_left

&CILLIAN spot 0.600 259 277 in zone 2 AND CILLIAN moves to layer 1 AND AUTUMN moves to layer 2

@CILLIAN is react_facepalm_disappointed AND AUTUMN is idle_awkward_scratch_loop

    AUTUMN (talk_sheepish_rubneck)
Oops..

}
“Measure 17ml of Shufflewick saliva and stir for 30 seconds”{

@POTIONS MINIGAME +1

@speechbubble is 128 262 to 100% with tail_top_left

    AUTUMN (talk_think_neutral)
I think we need to measure 17ml of Shufflewick saliva and stir for 30 seconds.

&AUTUMN is idle_shiftweight_neutral_loop

@CILLIAN is listen_nod_neutral_loop

@CILLIAN spot 0.600 259 337 in zone 2 AND CILLIAN moves to layer 2 AND CILLIAN is tinker_kneel_neutral_loop

@pause for a beat

sound correct_ding

@cut to zone 3
@zoom on 946 221 to 260% in 0
@speechbubble is 172 285 to 100% with tail_top_right

&MR BERALD spot 0.730 259 201 in zone 3 AND MR BERALD moves to layer 7

    MR BERALD (talk_reassure_neutral)
That's right, well done!

&MR BERALD is idle

@cut to zone 2
@zoom on 608 220 to 248% in 0

&CILLIAN spot 0.600 259 277 in zone 2 AND CILLIAN moves to layer 1 AND AUTUMN moves to layer 2

@CILLIAN is react_pumpfist_happy AND AUTUMN is react_claphands_happy

}
“Measure 17ml of Shufflewick saliva and mix for 30 seconds”{

@POTIONS MINIGAME +0

@speechbubble is 128 262 to 100% with tail_top_left

    AUTUMN (talk_think_neutral)
I think we need to measure 17ml of Shufflewick saliva and mix for 30 seconds.

&AUTUMN is idle_shiftweight_neutral_loop

@speechbubble is 164 280 to 100% with tail_top_right

    CILLIAN (talk_unsure)
Okay..

@CILLIAN spot 0.600 259 337 in zone 2 AND CILLIAN moves to layer 2 AND CILLIAN is tinker_kneel_neutral_loop

@pause for a beat

sound wrong_buzz

@cut to zone 3
@zoom on 946 221 to 260% in 0
@speechbubble is 163 285 to 100% with tail_top_right

    MR BERALD (talk_handsonhips_angry_loop)
Wrong! You have to | bold | stir | reset | for 30 seconds.

&MR BERALD is idle

@cut to zone 2
@zoom on 608 220 to 248% in 0
@speechbubble is 137 261 to 100% with tail_top_left

&CILLIAN spot 0.600 259 277 in zone 2 AND CILLIAN moves to layer 1 AND AUTUMN moves to layer 2

@CILLIAN is react_facepalm_disappointed AND AUTUMN is idle_awkward_scratch_loop

    AUTUMN (talk_sheepish_rubneck)
Oops..

}

}
“No, tell me the instructions again!”{
goto Snufflewick_Mushtoad_experiment
}
GEMS:5"Skip the minigame and earn three points"{

@CILLIAN +3

readerMessage | bold, color:green | Cillian +3

}

@CILLIAN is idle_shiftweight_neutral_loop AND AUTUMN is idle_shiftweight_neutral_loop

If (POTIONS MINIGAME = 0) {

@CILLIAN +0

readerMessage | bold, color:red | Cillian +0

} elif (POTIONS MINIGAME = 1) {

@CILLIAN +1

readerMessage | bold, color:green | Cillian +1

} elif (POTIONS MINIGAME = 2) {

@CILLIAN +2

readerMessage | bold, color:green | Cillian +2

} else {

@CILLIAN +3

readerMessage | bold, color:green | Cillian +3

}

I checked the code, and there is something missing, so if you have the code earlier (before that mini game), and the “goto” part, then it will probably match, but I can’t tell if everything is okay without knowing if you have the matching {} and where the goto thing is… and other choices before the mini game that would match this situation.

That’s why I asked about ss of the whole code and error. ;3

in your code, the “if” is still on a big I, so change that to a small “i” because that will also cause an error.

So this is before the game starts and the narrator asks whether the reader is ready to start the minigame. And then within that premium “Yes!” choice, that is when the game starts. My coding of if/else code is not the best and therefore it causes it to be very long as I’m not that advanced at making it shorter, finding short cuts, etc.

Is there anything else you want me to send?? :))

I replaced the capital ‘I’ of the ‘If’ with a lower case ‘i’ and it works!! Sorry if I was being a pain :sob: but thank you so much for your help. I definitely know who to ask next time lmao.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.