Limiting size of scripts

There is an internal limit on the size of compiled Pcode on any script. Pcode is the interpreted language into which scripts are compiled. A script that exceeds this limit can be compiled successfully, but the error “Maximum script size exceeded” displays when you attempt to save the script. Note that the amount of Pcode generated from a given script is not directly proportional to the number of lines of code, so you might encounter this error in a script with 1200 lines of code, but not in a script with 1500 lines of code. To avoid receiving this error, move code to functions that you post or trigger in the event script.