Panel użytkownika
Nazwa użytkownika:
Hasło:
Nie masz jeszcze konta?

Użycie biblioteki lualib, błąd wywołania lua API

Ostatnio zmodyfikowano 2021-06-15 17:47
Autor Wiadomość
Creativess
Temat założony przez niniejszego użytkownika
» 2021-06-15 15:50:29
Prawdopodobnie, problem lezy po innej stronie..
P-178778
Creativess
Temat założony przez niniejszego użytkownika
» 2021-06-15 15:50:40
Prawdopodobnie, problem lezy po stronie kodu silnika.
P-178779
DejaVu
» 2021-06-15 17:43:18
http://www.lua.org/manual/5.1/manual.html#7

Z dokumentacji wynika, że między 5.0, a 5.1 były breaking changes, więc może lepiej zrobić downgrade LUA do wersji w której projekt powstał? Chyba, że to Twój projekt własny - wówczas warto wziąć tutorial LUA 5.1 i zaimplementować to zgodnie z wytycznymi tej wersji.
P-178780
pekfos
» 2021-06-15 17:47:36
My application used to work, but I updated it to Lua 5.1 and it now crashes during initialization (OR: Why do I get a "no calling environment" error?)

The state initialization procedure changed between Lua 5.0 and Lua 5.1. It is now necessary to lua_call the various luaopen_* functions. Previously, these were simply called with a normal C call, but doing so now will cause a crash (or the above mentioned error) during the initialization of the io library.

The easiest way to initialize a lua_State is to use luaL_openlibs() which is defined in the file linit.c, or to copy the code from that file, modifying the list of libraries to initialize according to your needs.
https://lua-users.org/wiki/LuaFaq
P-178781
1 « 2 »
Poprzednia strona Strona 2 z 2