You can't set ENABLE_PUSH in the flag parameter, otherwise you will likely get strange crashes. Delete that "set(my,ENABLE_PUSH);" and use the code from the manual.
my.ENABLE_PUSH = ON; is C-Script
my.emask |= ENABLE_PUSH; is lite-C.
But first you must make up your mind in what language you are writing your script, C-Script or lite-C. Obviously you cant's have both in the same script.
Dont copy code without understanding it!!