Auto-translated
orlan-1, there is a special file in the map archive called MapScript.lua; you need to write the Lua code there, and it will be executed when the map starts. In the map editor, there is an option in the menu to edit this file.
Also, the first parameter of the PlayObjectAnimation function must be a string. If you gave an object a name in the editor, you need to enclose that name in single or double quotes when passing it to the function.