Wasn't this addressed in your last post (http://en.smath.info/forum/yaf_postst4702_If-statements.aspx#post23827) ??
The problem was in your "max" function in section 1.8. "max" function needs to have the arguments inside a matrix, to have it in the format you have (arguments separated by a comma) you have to use the "Max" function. Capital and lowercase makes a difference.
You have several "min" functions with the same issue (Section 1.5 and 1.6), where it needs to be changed to "Min".