I would but I'm just trying to get it to work, it's not even my code. I'll try some more things today and hopefully will find the problem...
Clean up the code first. Once the code is clean, it becomes far easier to see these errors
It's a syntax error
If the code executes just fine, then
by definition it is not a syntax error. Your example is a syntax error not because you're not putting brackets around your statements, but because you're putting an ifelse block after what it doesn't recognize to be part of an if block