ScriptAPI: corrected error messages

This removes about 60 kb of duplicating string literals from executable.