Nice but loops are rarely working ("Missing '<'" error when there is a closing bracket or other nonsense).
ooo that's not good, it's most likely a syntax error within the loop that flags as a loop closing error (sorry!) - if you send your code can fix! :)