Is there a way to link two branches of code?
In my CYOA, one of the paths starts with the main character finding a green light, if they do they go down the ufo path. If they don't, they go down another path that they could have gone down if they picked a different path at the beginning. So I have two paths that are exactly the same and to achieve this I've been just copying and paste the branch to that branch, but is there a better way to do this? Maybe with functions or something?
The lines I am talking about are 30-47 and 49-62
This is in python, if you can't see the python symbol by the name.
@Coder100 It's saying that that's invalid syntax.
For what? @Justinwest27
@Coder100 The commas
Oh well, add parentheses around them igif ... in (..., ..., ...):
@Justinwest27
@Coder100 That worked, thanks
np!
mark as correct answer please @Justinwest27
Why are you tabs so weird lol
@Coder100 Because they can be
@Coder100 What do you mean by tabs?
Spacing @Justinwest27
@Coder100 oh, yeah. if it works it works i guess
@Justinwest27 I have occasionally tried to make them not weird to no avail
Ok, so I think you are going to have to change how you do things.
This way allows you to rechoose paths and go all sorts of ways :D