Hey Yall! I am having another issues that has thoroughly stumped me.
Here is the error: Error: recess line 799: It is illegal to fall out of a *choice statement; you must *goto or *finish before the end of the indented block.
My code looks like this:
*label HomeTheoBM1
Now that you have the evidence you need to decide what to do with it.
*choice
#I pen a letter to Theo describing what I found and that I will release the love letter if he does not vote with me this afternoon.
*if (Stance = "Defend")
*set TheoStance "Defend"
*set TheoOpinion %-15
*set Blackmail "No"
*set TheoBM "Yes"
*goto homebmskip
*if (Stance = "Defend")
*set TheoStance "Empire"
*set TheoOpinion %-20
*set Blackmail "No"
*set TheoBM "Yes"
*goto homebmskip
*if (Stance = "Pastoria")
*set TheoStance "Pastoria"
*set TheoOpinion %-25
*set Blackmail "No"
*set TheoBM "Yes"
*goto homebmskip
#I feel too dirty to use the blackmail and I pen a letter to Theo describing what I found and letting him know that I destroyed it
*set TheoOpinion %+25
*set Blackmail "No"
*set TheoNoBM "Yes"
*goto homebmskip
The line the code is referencing is the second # in the code (the one to not use the blackmail). I can not for the life of me figure out what the issue is - have made dozens of tweaks but am still getting the same error. I have looked at the other topics on this error and have perused some of the suggested fixes to no avail.
Thanks in advanced!
Okay, this is ChoiceScript’s error messaging being weird; the error line isn’t actually the “I feel too dirty to use the blackmail” line, it’s the fact that it thinks there should be a line above it, specifically another *goto. And it thinks there should be a *goto there because you’ve only accounted for two variations of Stance in the first #; I assume the second *if (Stance = "Defend")
should be “Empire” or something similar?
1 Like
It’s possible that it could be that there’s no *else.
I believe instead of having three lots of *if, you should probably have
*if (A = "1")
*else if (A = "2")
*else
That way, regardless of what A is, there’s always some code that gets executed.
I don’t know whether ChoiceScript actually enforces this sort of thing or not, but it’s the first thing that jumped out to me.
1 Like
So I took y’alls suggestions and this is what I was able to come up with.
This fix cleaned up the lengthiness of having all the ifs under each person. Made the player have to go through more screens, but I think it ultimately gives them more clarity as to what they are doing as well.
That said, if you have any other suggestions for how I could clean this mess up my ears are open haha!
Thanks for your help!
*label bmvote
How would you like your blackmail victim to vote?
*choice
#To defend the port
*if (TheoBM = "Yes")
*set TheoStance "Defend"
*set TheoOpinion %-5
*goto homebmskip
*elseif (SansiaBM = "Yes")
*set SansiaStance "Defend"
*set SansiaOpinion %-5
*goto homebmskip
*elseif (QuillBM = "Yes")
*set QuillStance "Defend"
*set QuillOpinion %-10
*goto homebmskip
*elseif (OliveBM = "Yes")
*set OliveStance "Defend"
*set OliveOpinion %-15
*goto homebmskip
*elseif (ZeeBM = "Yes")
*set ZeeStance "Defend"
*set ZeeOpinion %-5
*goto homebmskip
*else
*goto test
#Accept Pastorias Rule
*if (TheoBM = "Yes")
*set TheoStance "Pastoria"
*goto homebmskip
*elseif (SansiaBM = "Yes")
*set SansiaStance "Pastoria"
*set SansiaOpinion %-5
*goto homebmskip
*elseif (QuillBM = "Yes")
*set QuillStance "Pastoria"
*set QuillOpinion %-15
*goto homebmskip
*elseif (OliveBM = "Yes")
*set OliveStance "Pastoria"
*set OliveOpinion %-5
*goto homebmskip
*elseif (ZeeBM = "Yes")
*set ZeeStance "Pastoria"
*set ZeeOpinion %-10
*goto homebmskip
*else
*goto test
#To seek the Empires Aid
*if (TheoBM = "Yes")
*set TheoStance "Empire"
*set TheoOpinion %-10
*goto homebmskip
*elseif (SansiaBM = "Yes")
*set SansiaStance "Empire"
*set SansiaOpinion %-15
*goto homebmskip
*elseif (QuillBM = "Yes")
*set QuillStance "Empire"
*set QuillOpinion %-5
*goto homebmskip
*elseif (OliveBM = "Yes")
*set OliveStance "Empire"
*set OliveOpinion %-5
*goto homebmskip
*elseif (ZeeBM = "Yes")
*set ZeeStance "Empire"
*set ZeeOpinion %-15
*goto homebmskip
*else
*goto test
*label test
This is an error, if you find this bug please send me an update on the Choice Forums.
You will now be sent back to home. This might cause some errors.
*goto home
*label HomeTheoBM1
Now that you have the evidence you need to decide what to do with it.
*choice
#I pen a letter to Theo describing what I found and that I will release the love letter if he does not vote with me this afternoon.
*set TheoBM "Yes"
*set Blackmail "No"
*goto bmvote
#I feel too dirty to use the blackmail and I pen a letter to Theo describing what I found and letting him know that I destroyed it
*set ZeeOpinion %+25
*set ZeeNoBM "Yes"
*set Blackmail "No"
*goto homebmskip