Functions execution return flow

I am trying to make a function which checks if enum type is equal to none , if it is equal then program execution flow should go ahead and if false , it should stop the flow of program until its true , but its even with pins and condition false or without pins in my function connected to return output its executing the flow ahead to it

yeah my enum is ‘none’ as a state i name it , and thanks for it , it helped

I don’t know how you got ‘none’ on your enum variable, unless one of your enums is ‘none’.
Nevertheless, this is how to do it:

You can then use it like this:

348253-screenshot-3.jpg

Or, if you make the function pure:

348254-screenshot-4.jpg