Simple enough. When calling a function from code, as opposed to
an on_key command, you need to specify what parameters are being passed
to the function, even if there isnt any.
To summarise, change the line
if (key_enter) new_box;
to be
if (key_enter) new_box();
and it'll fix the syntax error. I havent looked any deeper than that.