I am currently working on trying to update the version of Lua used in Dungeon Crawl: Stone Soup, and I am running into issue since the luaL_openlib function is used heavily and has since been depricated. Currently, I have it replaced with the following code (using different paramaters depending on the place): //luaL_openlib(ls, nullptr, lr, ..
Category : lua
After realizing it is nearly impossible to find help on getting keybindings to work with the C plugin in MPV (Possible to allow key bindings with MPV C API when no video (GUI) is being shown?), I decided to learn some Lua to help with the cause. Problem is, the docs aren’t very clear on ..
Related: How to compile srlua? How do I Make an executable Lua script using srlua? The first link is the exact question I am asking here. However, the sole answer is unsatisfactory as it assumes multiple things, namely that the OP is already using Cmake (a fact disproved by the OP’s comment on the answer). ..
I am using this script as a template to rename a file in VLC: https://github.com/surrim/vlc-delete/ The Script works as intended. My code looks like this: function descriptor() return { title = "VLC Rename"; version = "0.1"; author = "I"; shortdesc = "Rename current file"; description = [[ <h1>vlc-rename</h1>" When you’re playing a file, use VLC ..
When debugging an issue on writing BMP using binary data with Lua, I ran on a strange issue that some bytes were being introduced. When we write string.char(10), the bytes 0x0D0A appear. local file = io.open("forbchars.bin","w") local out = {} for i=1,255 do out[#out+1] = string.char(i) out[#out+1] = string.char(255) end file:write(table.concat(out)) If you inspect this ..
I have an issue with the accents with French Windows 10 local origin = "D:temptest.txt" local destination = "D:temptesté.txt" local cpTemplate = "copy ""..origin.."" ""..destination..""" os.execute(cpTemplate) A console log correctly shows: copy "D:temptest.txt" "D:temptesté.txt" This does not create a "testé.txt" file but: testé.txt Of course, if there is an accent in the folder name (D:temp ..
I encounter a bug with libvlc where attempting to play video from YouTube result in error http stream error: local stream 1 error: Cancellation (0x8) Context C++ code: #include <iostream> #include <thread> #include <vlc/vlc.h> #include <vlc/libvlc.h> #include <vlcpp/vlc.hpp> int main() { const char *const arg[] = { "–no-video", "-vv" }; VLC::Instance instance = VLC::Instance(2, arg); ..
I run a small gameserver, I have one thread and one lua_State, the thread is always busy with small tasks but every now and then a heavier tasks is requested which causes a small hang of around 100-200ms, I know exactly what these tasks are and I’ve optimized them as much as possible. Now I ..
I have a .lua file as follows: timeout = 3000 index = 15 function Test() A(index, timeout) B() end A and B fuctions are implemented in the c++. It will be excuted with a ‘luaL_dofile(L, "test.lua");’ in c++.But the timeout and the index will change at different times. The question is how to modify the ..
I’m making a project using OpenCV and Lua in C++. OpenCV requires x64 and when I embedded lua it started giving me linker errors(like : Error LNK2019 unresolved external symbol lua_tostring referenced in function "blah blah"). When I switch back to x86 OpenCV starts complaining and I don’t get any errors related to the linker ..
Recent Comments