'/return run function' with execute unless function
I have 2 functions where the first one is generating a random number and then executes the second function that then checks for the number and runs more functions based on that (they disable a command based on what number it got). Since i don't want the same command thats already disabled to disable again, i made the first function run
execute unless function examplefunction_2 run function this_function. But since the returns in the second function arereturn run function ...it returns as fail (from what i understand in minecraft wiki). Is there any way to do this better? (i need the returns to run a function because i want to run multiple commands based on what number)function_1:
execute unless function function_2 run function function_1``` function_2: ```execute unless score .1 disabled matches 1 if score #temp temp_scoreboard matches 1 run return run function return_function_1 execute unless score .2 disabled matches 1 if score #temp temp_scoreboard matches 2 run return run function return_function_2 execute unless score .3 disabled matches 1 if score #temp temp_scoreboard matches 3 run return run function return_function_3 execute unless score .4 disabled matches 1 if score #temp temp_scoreboard matches 4 run return run function return_function_4 return fail```