The error tells you where it is, in an <<if>>, and describes the problem, which is an erroneous right parenthesis. Check the first line (the first <<if>>) in your sample, there's a right paren (")") at the end of the conditional where there shouldn't be.
Beyond that. You haven't replaced all instances of Harlowe's (random:) macro. Check the second line (the first <<set>>) in your sample.