Hi there,
I'm currently working on a Teal script for Final Fantasy XI's Windower. Most things have worked so far, however, Windower globally extends the Lua coroutine module, and I haven't figured out how to declare this in Teal yet.
From the Windower Wiki:
Furthermore, two functions are added to the coroutine table:
coroutine.schedule(fn, time)
fn function - Function to be scheduled
time number - Time in seconds when fn is supposed to be run
Executes fn delayed by time seconds. Returns the scheduled coroutine.
coroutine.sleep(time)
time number - Time in seconds
Sleeps the current evaluation for the given period of time.
I tried declaring it in windower.d.tl like so:
global record coroutine
schedule: function(fn: function, time: number): thread
sleep: function(time: number)
end
but unfortunately, Teal does not recognize the functions this way. What is the correct way of declaring them?
Thanks in advance!
Hi there,
I'm currently working on a Teal script for Final Fantasy XI's Windower. Most things have worked so far, however, Windower globally extends the Lua
coroutinemodule, and I haven't figured out how to declare this in Teal yet.From the Windower Wiki:
I tried declaring it in
windower.d.tllike so:but unfortunately, Teal does not recognize the functions this way. What is the correct way of declaring them?
Thanks in advance!