Yes i did meet this thing. When i have more than one script files in the project and i didn't set correctly in the Preferences the Use current script in the Environment tab. When i uncheck that and set the Main script file name in the Engine tab, worked well.