[DiscordArchive] so any C++ class instance at all is always invalidated as soon as the trigger is over ? so each trig
[DiscordArchive] so any C++ class instance at all is always invalidated as soon as the trigger is over ? so each trig
Archived author: jackpoz • Posted: 2024-03-09T23:38:52.101000+00:00
Original source
yeah, no SQL queries from Lua, ty
Archived author: jackpoz • Posted: 2024-03-09T23:39:28.393000+00:00
Original source
and no HTTP client either
Archived author: Foe • Posted: 2024-03-09T23:39:35.194000+00:00
Original source
I don't think SQL queries from Lua is a problem, but it should be restricted to async queries
Archived author: Tea • Posted: 2024-03-09T23:39:49.048000+00:00
Original source
well now that you guys have those c modules, you could move sql to eluna-ext
Archived author: jackpoz • Posted: 2024-03-09T23:39:51.027000+00:00
Original source
imagine posting a Lua script for a npc vendor that actually sends credentials from auth db to a web server
Archived author: Foe • Posted: 2024-03-09T23:39:51.043000+00:00
Original source
HTTP no, you can use LuaSocket if you really want to
Archived author: Foe • Posted: 2024-03-09T23:40:05.461000+00:00
Original source
That would be fun
Archived author: jackpoz • Posted: 2024-03-09T23:40:15.061000+00:00
Original source
Hoffa used to do such stuff
Archived author: Rochet2 • Posted: 2024-03-09T23:40:20.735000+00:00
Original source
Indeed. Its hard to get it right and efficient. I was thinking of a kind of solution here https://github.com/ThePhD/sol2/issues/1010
Where one could basically attach a shared_ptr to all C++ classes to indicate whether the instance exists or not. It would be set to false upon destruction. And then when you push a pointer to lua, you would create a shared ptr to store with the data in lua.
You would then be able to check if the object still exists through the shared ptr and it would get invalidated when the object is destroyed. Could probably also use weak_ptr too.
Archived author: jackpoz • Posted: 2024-03-09T23:40:23.679000+00:00
Original source
15 years ago or so