So I'm working on editing a script and when i try to run it it says : :1405: main function has more than 200 local variables. How do I fix this? P.S. i can't put the script in a code block because of how huge it is
Source: http://lua.2524044.n2.nabble.com/main-function-has-more-than-200-local-variables-td3080987.html
Local variables are a limited resource. Due to the structure of the VM bytecode, and a few other things, a function cannot have more than 256 local variables. In practice, the limit is reduced down to 200, though it can probably be raised to 240 or 250 without too many issues. Local variables are intended to be variables though, not named constants. I would suggest either placing the constants into a table, or modifying the parser to accept named constants in a way similar to C's "#define CONSTANT value".
Closed as Too Broad by User#24403
This question has been closed because it is too broad and is generally unanswerable. Please ask a more specific question.
Why was this question closed?