lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hello, I'm trying to get a table function to nil the variable that it was assigned to. just like this:

reddog = Load_Sprite( "reddog.dat" ) --This assigns { NAME = "reddog.dat" } to reddog.

reddog.Kill() -- I want this to do reddog = nil

I am using lua 4.0. Is there anyway I can do this from LUA? I tried making a function in that table called Kill(), but how do I know what variable called it?

Denis Lamarche

Send and receive Hotmail on your mobile device: