View Single Post
04-18-09, 12:47 AM   #20
Azul
Banned
 
Azul's Avatar
Join Date: Apr 2009
Posts: 19
Originally Posted by ChaosInc View Post
You can't check for a local variable outside it's block. You'd have to rename the global foo as something else and pass the data out to it.

Code:
function testfunction(frame)
    if not arg1 then 
        local foo = "foo"
        local bar = "bar"
        arg1 = foo
        arg2 = bar
    end
    text=arg1.. arg2
    DEFAULT_CHAT_FRAME:AddMessage(text)  -- test to make sure everything goes smoothly

local f = CreateFrame("FRAME, "Blah")
f:SetScript("OnUpdate", testfunction(self))

end
But that won't help your 60 upvalue any. For that, you're don't really have a choice but to condense it down via one of the previously mentioned methods.
Tables are to slow. If there's a decent (not function call, like the extremely slow bit library) way to do bitwise operations in it, I think I could bring the variable count down enough to placate this arbitrary limitation. I don't know how though. All I could find was that uselessly slow bit function library. Any ideas?

If not, then all I can think of is updating the lua package in WoW to one that works better.. I don't know how to do this though, and it might be frowned upon by Blizzard (can anyone confirm this?).

Last edited by Azul : 04-18-09 at 12:51 AM.