Character Limit: There is a limit of the maximum number of characters per script. It is somewhere around 30000 characters ( the true limit is most likely 32767, which is the max value for a 16-bit signed integer, which is how script length is stored in the .esp – thanks to Horatio for this info). If this occurs you can no longer type in the editor window. To save characters try the following:
• Remove characters
• Use shorter variable names
• See if the script can be split and some part maybe handled in a global script or attached to a separate object as a separate script.
Line Limit: there also is reportedly a maximum line limit. This seems to vary and reports on the forum range between 900-and 1500 lines of code. It's probably rather a limit of the compiled script than the actual lines of text, so empty lines and comments don't count. This is reported by an error message upon saving the script.
If-elseif limit: There is a limit on the maximum number of if-elseif conditions that can be used per script. I am not sure of the absolute number (I heard both 127 and 256). Also there is a maximum depth of nested if commands, it's reportedly 10 (thanks Riiak). (Note: Error message for exceeding the maximum depth of nested if's is "Max nesting of 10 exceeded on line XXX" - in this case, you'll need to break it up somehow.)
Instruction Limit: An If-block or While-block is limited to 255 compiled commands (per block, not per script). The limit is not on the number of lines (each line may end up as several commands when compiled), and blank lines and comments don't count towards this total. -(Dave Humphrey, thanks to Galsiah for pointing this out)
Script Name Limit: TunaandCheese reported a limit to the length of the scriptname:
Your script's name should never go over 31 characters in length. It if you have 32 characters in the script name there will be a box on the end of the script and when there is 33 characters the 33rd character goes funny, the 34th character seemed to be fine.
Character 32 gets replaced by some other character in the title bar and in the Details list information. From looking at the .esm/.esp/.ess format information on Argent's web site, apparently only 32 bytes are allocated for the script name, which makes a 31 character limit reasonable. -(DinkumThinkum)