Well that's all defined in the SDK. That is actually a check that occurs in game/script/Script_Program.cpp in the AllocDef function. You could always increase MAX_GLOBALS in game/script/Script_Program.h to get rid of the error.
The thing is, that is not just for your map script. The gameLocal.program is what compiles ALL the scripts. That means all the scripts combined have too many globals.
The next thing to note is, if you honestly have that much scripting code, it might be better to offset some of that into C++ code if possible. If you don't want to though, you can tweak the max number of statements, max string length, etc in that Script_Program.h file.
It's so nice that they included the code for the scripting language.
