Nore wrote:I found some Lua code that serializes functions, etc..., but it can't serialize coroutines. However, coroutine serialization would be a very powerful feature for coding mods.
Nore wrote:You see the Luacontroller in mesecons? I wanted to allow using for/while/function/etc., but:
- the code would not hang the server forever, if looping
- the code would be executed only once
The idea I had was to add a coroutine.yield() each iteration of a loop, or each time a function is entered. However, if the code continued after server restart, the coroutine would have needed to be serialized.
About serializing functions, mesecons would crash with Luacontroller before a recent fix. What would be at least needed is prevention from crash.
Users browsing this forum: No registered users and 14 guests