Hello. So, I just started my game and when I was testing it some bug appeared and I’m failing to fix it ;-; could some good soul help me here?
The error is: “startup line 254: no expression specified”
In these lines are:
#No, I refuse.
You suspected you had depression, but you really hadn't any hopes that a doctor would help.
*if truthful = true
*goto Truth
*elseif
*goto Lie
I’m really not understanding in what I went wrong ;-;
*choice
#No, I refuse.
You suspected you had depression, but you really hadn't any hopes that a doctor would help.
*if {truthful = true}
*goto Truth
*elseif
*goto Lie
Try it like this?
I would suspect that you forgot the {}, at least it messes everything up whenever I forgot them
Plenty of reasons to use *elseif and *else it does not have to be used only in *choice statements but can be used for conditional text outputs like gender specific; used as a measuring device to put put players previous choices to a certain point in a story. It’s just a different way of going about doing things instead of using a lot of *if statements.
Read the section “Fake bugs in Quicktest” for the reason CoG will often make you use *else in your choices. The short version is, it keeps the game from crashing if you’ve overlooked something – for example,
Yeah, I didn’t properly get it either until the first time I ran Quicktest on my WiP. Much editing, much griping…
Yes, your example would pass Quicktest. Run QT on your game draft and see how often it chokes on your code (the “falling out of choice” error will be the one in question). That should give you a pretty good sense of what bits need an *else and which don’t.
Took me a little bit to figure out how to quicktest and randomtest. But I got it now. This stuff is going to be a lifesaver. Already got a “It is illegal to fall out of a *choice statement; you must *goto or *finish before the end of the indented block.”