Function call not allowed.

#2083   Compile-time error

Function call not allowed.

Additional Information

Function calls aren't allowed in the conditions for INSERTION-BREAK or REPLACEMENT-BREAK rules.

Explanation

So you're doing line-breaking on the #MAIN-OUTPUT, call a function, and inside that function you do an OUTPUT to the #MAIN-OUTPUT stream. Where does that text go in relation to the text you're currently breaking?