Without actually looking at the script it looks like it is using "modifier" as the name of a variable. At some point "modifier" became a reserved word, hence the conflict. My nomination for the Mr. Obvious Award has already been submitted.
The fix is to find the lines where the variable is...