lua-users home
lua-l archive

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


> But how do I correctly call this not explicitly defined "top level
> function" containing all code of my script?

You can't, but you can move the same code inside a function and call that
instead.


Jani

----- Original Message -----
From: "Jens Hassler" <lukey@gmx.de>
To: "Multiple recipients of list" <lua-l@tecgraf.puc-rio.br>
Sent: Monday, September 30, 2002 7:45 PM
Subject: Re: efficient calling of lua code


> Hi Jani,
>
> > Just define some functions in Lua code, dobuffer only once, and call
> > the Lua functions from C++ code...
>
> Okay, I know how to call Lua functions from C++, I do this in my game,
> too.
>
> But how do I correctly call this not explicitly defined "top level
> function" containing all code of my script?
>
> Thx,
> Jens