Invalid Return Error

So I am suppose to put the gosub scenes below the actual scene I want it to play?

Just do this

#option
.... *gosub lilyscene1 
.... *goto lilyscene2 

Which choice are you talking about?
I don’t see a *goto Chapter lllA

NO IT IS NOT AN OPTION. CHAPTERIIIA IS A SEPERATE CHAPTER IN THE BOOK BUT INSTEAD OF GOING TO *label ChapterIIIA it goes to xrayscene1. How do I prevent this

Quick question is *label xrayscene1 at the top of the file?

Is all of this text/code in one physical file?

If so, CS will read it top to bottom and therefore it will read ‘xrayscene1’ first, every single time.
Unless when you load this file (via a *goto_scene) you direct it to a specific label within that file.

That will cause your *return error too, as it reaches the *return in lilyscene1 without having gone through a *gosub.

If you are reading this file via a *goto_scene + a label (that is not xrayscene1) and this error is occurring, then something else is happening

Yes it is at the top of the file and yes I do direct it to label chapterIIIA

Here take a look for yourself

*if (floodrunner="true")
 *goto_scene ChapterIIIA
*if (floodrunner="false")
 *goto_scene ChapterIIIB

That takes you to the scene (file) named ChapterIIIA, not the label.

You want

*goto_scene ChapterIIIA ChapterIIIA

That is the issue. Choicescript reaches *label xrayscene1 before *label chapterIIIA so it never goes to the *gosub and hits the *return first.

Put this bit

*if (floodrunner="true")
 *goto ChapterIIIA
*if (floodrunner="false")
 *goto ChapterIIIB

At the top of the scene above *label xrayscene1 an that should fix the error.

edit: edit to change to *goto instead of *goto_scene as it seems to be in one file

Okay that makes more snese

It works thanks for the help