lua-users home
lua-l archive

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



Rici Lake wrote:
Perhaps you need to be clearer about what it is you are trying to accomplish?

Sorry. It seems like I'm not good in explaining things. :)

I give an example, hopefully it explains better what I would like to accomplish.

I want execute a file containing Lua code. The file could for example contain following code:
a = 1
print(a)
a = a + 1


My fictional hooking function would control every line executed. So when first line is executed the function gets string "a = 1" and possibly other information. At second line it gets string "print(a)" etc. Now if my function accepts (for undefined reasons) parameter string it executes it instead of Lua. So if the function would not accept the first line there would be no variable "a". If hooking function does not execute string so does not Lua.

f