[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Mixing lua-function call and normal script code
- From: Peter Shook <pshook@...>
- Date: Mon, 04 Aug 2003 11:28:49 -0400
Metzler wrote:
My problem is, that i first want the blua function to be executed and then,
anywhen later in my c code i want to start the 'normal' script.
Some other options are to put your main loop in a function called main
function blua()
print"x"
end
function main()
running = true
while running do
print"s2"
coroutine.yield(1)
end
end
or just return an anonymous function that is the main loop.
function blua()
print"x"
end
-- main loop is returned as a function
return function()
running = true
while running do
print"s2"
coroutine.yield(1)
end
end