I have created a lucktest and originally it was in a separate scene but that didn’t work so now I am using gosub
Here is the gosub, at the bottom of my scene page:
It doesn’t return to where I called it though, which looks like this:
#Sneak upstairs
*label sneakup
*set snuck_stairs +1
*choice
#Test your luck
*gosub lucktestgosub
*selectable_if (lucky = true) #Lucky
Apologies, I have tried all I can to get it working
The problem seems to be in the selectable_if instead. You didn’t add a *choice for it. To make sure your gosub is returning to where you want to, simply add a text after it like "We returned here" or something.
Btw you can use gosubs from other scene files if you use *gosub_scene instead of just *gosub, the effect is the same.
You are having that error because you need to add a *goto inside the *if and *else chain or the *return in both as was suggested by Loudbeat.
This is a requirement from choicescript which you can disable if you use implicit control flow. I was using it when I made that *gosub for you a while back so you would need to use it to correct it.
Disabling it will remove the requirement allowing you to use *if and *else without getting annoyed with redundant labels all the time.
It was an error with the return and I hadn’t tabbed the text after #Lucky
Just as an aside, I am trying to approach this logically and in my mind the code would go back as soon as it hit return, ie it could never reach a second return?! anyway…