You got some unfinished busines with your int relay1() function in that code.
When you click the
icon at the bottom of your post you can edit your code.
I’ve also reformatted your code block. Have a look at it how to post a code block correctly.
Also have a look here
Forum Tips and Tricks
BTW, in the other thread I already posted some suggestions of which I can’t see any sign in your current code.