How add a Window menu to an application?

Hi @Sam_Rowlands
Why i have a Syntax error on this line?

Center a Window : Centering a Window - #2 by Sam_Rowlands

declare sub NSWindowCenter lib "AppKit" selector "center" ( NSWindowInstance as integer ) NSWindowCenter( me.handle )