when you compile or after you load a savegame?
Because usually that error indicates that you tried to use an older savegame after installing a script that requires a new game to initialize itself.
There are other reasons for such errors, but in 95% of all cases it's an old savegame file...