View Single Post
04-18-09, 01:57 AM   #36
Pytlask
A Defias Bandit
 
Pytlask's Avatar
Join Date: Apr 2009
Posts: 2
Originally Posted by Azul View Post
There are no scripting or programming languages that have a 60 local variable limit besides Lua.
No, not a specific 60 local variable limit, but they do usually have limits. With several functions using 60 variables, you can easily pass the maximum stack size in C. (Yes, some would likely have to be arrays/strings)

Originally Posted by Azul View Post
There's really nothing interesting to see in my code. I just have a lot of variables. Some of them could be condensed by an efficient bitmasking operation, but it seems Lua only has extremely slow function based ones.
Actually, Lua's implementation of the operations in the bit library are extremely efficient.


Originally Posted by Azul View Post
What do you hope to see? And why? It's completely irrelevant to the question at hand. All I'm asking for a way to have >60 local variables. I'm not sure what more information is needed then that.
We hope to see the code, because that is where the problem is. You do not need 60 local variables in an OnUpdate function. If we can help you separate out the different operations into separate OnEvent functions, you will not have to worry about the 'inefficiency' of using tables to store options. (Lua tables are actually very efficient as well. You just have to be careful about leaving them around as garbage)