Originally Posted by celebros
At first blush this looks like a scope issue.
http://www.lua.org/manual/5.1/manual.html#2.6
I'm a bit curious of the need for 60 separate local variables being accessed on each frame update. You also should take care of creating new locals in each update as well, as it appears that your goal is extreme performance. Though I would offer the advice that getting it working with a table at first and then going back and optimizing the most often executed code wouldntield better or at least more timely results. Just my $.02. I could be wrong.
|
They are generated once on load. This process is very expensive, and can't really be optimized any more then it already is. Their values are (sometimes) modified outside of the OnUpdate by slash commands. Performance is to slow when they are global. When there are over 60 defined local above the OnUpdate function I get that stupid "to many upvalues" error.
Guess I should have explained this in the first post. I thought I did though. Sorry.
P.S. It does work as tables but is to slow.
Originally Posted by ChaosInc
Sorry, wasn't meant to be a full blown working example, just kind of a guide to help ya debug. It's 1:30am and I'm tired.
|
Thanks, it has the exact same problem my example does, though.