Some problems


#1

Hello to all! I have some problems regarding the Quicktest. When I check the game using it, it writes this: Error: line 228: It is illegal to fall out of a *choice statement; you must *goto or *finish before the end of the indented block. It is quite difficult to find this line. Do you know what I have to do? Thanks!


#2

Struggling with learning the code myself, but you’ll want to close with a *goto, *goto_scene or a *finish command if there are no more choices afterwards, I think.

You can use Notepad’s goto command too. Just type in 228 when asked after you’ve found the option in the edit menu.

Edit: Oh, one tip. Have you enabled the status bar in Notepad? It’ll tell you what line you’re viewing, but it doesn’t seem to work with word wrap on.

Also, I find spacing things out with empty line gaps in the coding helps, even with indented blocks. (I was going to give an example but it doesn’t seem like the forums are keeping the spacing unfortunately. :frowning: )


#3

First you have to use a text editor like notepad ++ to see code lines number its not line´s text number .
The error means you write a choice option but forget to continue it puting a goto goto_scene or just a finish command choices have to end with one of that commands


#4

Well, I also read the Quicktest has “fake bugs”. When I play the game myself all is right but the Quicktest says there is a problem. Is it possible it’s a “fake bug”?


#5

I think not this is a normal error not a weird error that happens when game mixtures some complicated conditions and that errors are extremely rare lol. You dont know enough to cause one. Go editor put code line and see what is write there 99,9% is your fault


#6

I’ve had that problem several times, even if I used *goto, *finish, or *gotos_scene. I fix it by putting the choice that gives the error in another spot (i.e. higher or lower down the list of options)


#7

Well, I’m quite tired of this error. There is no problem when I play it myself but the Quicktest says it’s there. @MaraJade I’ve tried to use the editor but I think I didn’t find this line. Can you advise something else to solve this problem? Why does it write there is a problem if there is no problem when I play it myself?


#8

First you have to know what line is lol. I havent pc to recommend you a text editor but almost all pc people use notepad ++ is free and have code lines . In my phone text editor in settings have a beautiful option show code line . Also there is a online Choicescript text editor Choice IDE , Copy your text there and search the infamous code line.

Sam has give you a good advice about change inside choice text. That happens when you write choices so long that code “forgot” where choice begins.

Another solution is use fake_choice command because with it you dont need to use goto goto_scene or finish commands .

My advice is search text editor or use Choice IDE and look code and copy here . When i was starting code i had similar problem. And what was problem i had a

a*choice

didnt give me problem in actual play but giveme a error in quicktest. My advice post here code line when you found it


#9

Hello again. @MaraJade well, I have the same error but now it’s error: line 139. This error appears when Quicktest checks the choicescript_stats and I have many necessary there. Can you check the written below? For example:


*label MainStats
*choice
  #Vigilance.
    *if vigilance <=15
     Vigilance, vigilance....
     *choice
      #Return back.
        *goto MainStats
    *elseif vigilance <=30
     Vigilance, vigilance....
     *choice
      #Return back.
        *goto MainStats
    *elseif vigilance <=50
     Vigilance, vigilance...
     *choice
      #Return back.
        *goto MainStats
    *else
     You have no vigilance. 
     *goto MainStats 

Is this example right or there are errors? You said the code “forgot” where choice begins and because of this there is this error. I have many choices there.


#10

Stop, it is not right.


#11

Your code is clearly wrong , the forum has messed with it. but you could code it easier .

I dont understand what you try to code at all . If you want to say how many vigilance player has you only has to code¨for example

You have got ${vigilance} 

Or if you have vigilance like a stat


Stats
*stat_char
  percentage vigilance Vigilance

Like a variable


*if (vigilance < 20)
    You arent aware of your surroundings
*if (vigilance >=20)
    You are becoming more perceptive.


#12

Damn forum lol. forget the < br > but you could get the basics


#13

@MaraJade Yes, it’s wrong. Thanks for help! Just I wanted to ask is it right to write like this:


*label Main
*choice
 #Vigilance.
  *if vigilance >15
   You have enough vigilance.
   *choice
    #Return back.
     *goto Main
  *elseif vigilance >25
   You have more vigilance. 
   *choice
    #Return back.
     *goto Main
  *else
   You have no vigilance.
   *goto Main

There are many choices I have like above. Is it possible Quicktest writes fake bugs because of this? Because there is no problem when I play it myself.


#14

You couldnt have a choice with only a option , your code well, I just dont understand what you want achieve. Because if you want people see their stats ,this is not the way . If you want people see the amount of vigilance still have tons of practical and easier ways to do it.

But the code itself is wrong ,lol . You put a choice with only a choice that is a error . You have to put at least 2 because if it is only one Wtf you could choose . I could put you a short code but to you understand your failure i put your code better .


*label main
*choice
    #Vigilance
        *if vigilance > 15
            You have enough vigilance.
            *choice
                #Return
                    *goto main
                #Whatever other option.
                    *goto wherever
        *elseif vigilance > 25
            You have more vigilance
            *goto main
        *else
            You have no vigilance
            *goto main

If you want pm al your label code and what you want achieve with the code .

Edit: Also The way you put stat checks are weird normal could be start with less , but that doesn’t cause errors .


#15

@MaraJade Well, I’ve checked your advise but I still have the same error.


#16

Pm me ALL the scene code .If you only put this chunk no way to know it . Due vigilance is only first choice of main label, where are the rest? The most probable is you have got problem Sam pointed out due vigilance choice is too long, so try this.


*label main
*choice
    #Vigilance
        *goto other_label
    #Rest of choices text ...
*label other_label
*if vigilance...

This has to work , if not well with only this chunk, i couldn’t help you. Did you try change order of vigilance option inside the choice?


#17

*label main
*choice
  #Vigilance.
    *if vigilance >25
      You have more vigilance.
      *goto main

    *elseif vigilance >15
      You have enough vigilance. 
      *goto main

    *else
      You have no vigilance.
      *goto main

Try it like this?


#18

@MaraJade Thank you so much!!! It works!! @Nocturnal_Stillness thank you too that you tried to help to me. Thanks to all who tried to help me!! Finally it works!!


#19

@Dmitry
I told ya :stuck_out_tongue:


#20

@Dmitry

I suggested swapping the stat checks around otherwise the >25 one would never trigger as it’d trigger the >15 first and skip it.