Open up Preferences>General and enable the setting. It's about half way down the list.
If it is already enabled and you are still getting the error then there is probably an error in the script.
Please take some time to study up on how to use AE. It's the most complex program Adobe makes and you'll have nothing but trouble until you spend some time reading the manual.