• Announcement: Lua.org now officially recommends this forum as a meeting place for the Lua community

Recent content by dinsdale247

  1. dinsdale247

    using global Variable in IF-THEN

    Hi Bobbie, The code fails because your variable x is only ever created when the first if statement is true. So if `devicechanged['RemoteWK2'] == "Off"` then the variable x is created when you assign the value 1. If, however `devicechanged['RemoteWK2'] == "On"` then x is never created. The...
  2. dinsdale247

    Windows Best way to install and develop in lua on windows 10

    Hi, Try downloading my Winlua installer? WinLua - Lua Plus Tools for Windows. LuaRocks is installed and set up to work with Lua 5.3. The installer takes care of the paths and whatnot. It also comes with a C/C++ compiler that works mostly out of the box. The installer includes Lua 5.4, but you...
  3. dinsdale247

    Windows How can I make a drm in the Lua?

    I don't think it's necessary to create a new codec for the audio/video, I think you just want to encrypt the files and decrypt them in memory. Open the file in your plugin, pass the bytes to the encryption library, decrypt them in memory and pass the byte stream to the player? Again, I'm...
  4. dinsdale247

    Text macro

    Sorry. Programming In Lua = PIL. Great book by one of the Lua authors.
  5. dinsdale247

    LuaTeX fonts

    http://www.luatex.org/ http://www.luatex.org/download.html http://www.luatex.org/support.html
  6. dinsdale247

    Linux Cant capture all output from io.popen

    So from what I can tell you're code won't work for a number of reasons. The most fundamental is the way you've strung your commands together won't capture the output. The cd command fails long before you've asked bash to pipe stderr to sdtout. io.popen won't work for your needs. The restriction...
  7. dinsdale247

    Roblox Leaderboard not showing top right

    Hi, Have you compared to this tutorial? Leaderboards
  8. dinsdale247

    Embedding Lua in C/C++

    Hi, check out Sol3. It's an amazing binging library for Lua/C++. Cross platform. I have two articles on using it on Windows, but the code would be the same: https://luaforum.com/threads/lua-sol-3-and-c-oh-my-part-1-nice-doggy.196/...
  9. dinsdale247

    Windows How can I make a drm in the Lua?

    Hi, I think you are asking about creating your own Digital Rights Management? But you also asked about encryption, which is something different (but related). Both topics are very large and difficult. Not to mention the least of your issues: learning Lua and AMS. However, if you were just...
  10. dinsdale247

    Announcing WinLua Toolchain Installer - Release 2012a

    WinLua Toolchain News - CodeLLDB for VS Code works with WinLua Hi everyone, I have super good news! I can confirm that there is a working LLVM debugger for VS Code. Vadim Chugunov has created CodeLLDB, a plugin for the Windows native LLDB debugger. CodeLLDB works seamlessly with WinLua...
  11. dinsdale247

    Linux Cant capture all output from io.popen

    Ah, I see now. There is a thread on stack overflow that has a solution for manipulating both stderr and stdout: Use stderr in lua io.popen to determine faulty function call The answer is that you must use something like luaposix. There is a second answer at the bottom that proposes a wrapper...
  12. dinsdale247

    Launch External Script CMD/BAT in lua module

    local sf = string.format --~I hate typing string.format --This function isn't used, it's here for reference local function run_cmd(cmd, param_string) command_str = sf("%s %s", cmd, param_string or "") print("Running with os.execute:",command_str) local result =...
  13. dinsdale247

    How would I create a Lua interface so the user can write his/her code in a startup() method and a runloop() method

    It sounds like you are looking for a shared table. You would have three scripts. The main script would contain a table variable. The main script would then call the startup script and then the runloop script. There are a few ways you could work it. The sub scripts might have an init function or...
  14. dinsdale247

    How can i get type of class ?

    In getParentType, the variable obj just shows up out of nowhere. I'm not sure why you want to overload the type function in getParentType. I think that's a bad idea. Also your last print statement will just use the Lua type function. Not sure that was your intention? Indentation is very...
  15. dinsdale247

    Lua Odbc With Debian Error Path ODBC?

    This is telling you that it can't find the odbc package for lua. Have you installed it? Is it supposed to be in '/usr/src/ajto/lua_Mysql'? If your odbc package is not in a standard place (e.g. installed with LuaRocks or other package manager) then you will need to specify the path to the module...