why isint eof a vaild statement?
i am very very new to lua (about 3 days into learning) and an error in the console is saying that it is excpecting <eof> but recived end and when i try to fix the error i figure out that eof isint a vaild statement (not sure if that is the right term) having the valid statements being colored to match the statement
eof being not colored
https://redd.it/1m85wkd
@r_lua
i am very very new to lua (about 3 days into learning) and an error in the console is saying that it is excpecting <eof> but recived end and when i try to fix the error i figure out that eof isint a vaild statement (not sure if that is the right term) having the valid statements being colored to match the statement
eof being not colored
https://redd.it/1m85wkd
@r_lua
Does a Logitech G915 X allow LUA noscripting?
I'm trying to get a new keyboard to replace my seven year old G910, only two problems...there seems to be no Mkey state for this keyboard, meaning nine macro keys is all you can get, and worse yet my old noscripts don't work at all. This is a major issue because, for some noscripts, it's just too long, and so having to write a noscript is just easier (especially when it comes to adding a comment on what said code is supposed to accomplish), or if you have to move the mouse to a specific place on screen for various actions. Point is noscripting is a real time saver, and I'd like to get it to work, which brings me to my main question: does the Logitech G915 X even allow noscripting in the first place?
I've tried modifying my code from
to
and even
and none of them will cause the noscript to run, which in this case, is just to press and release a random key on the keyboard, and nothing else...it's a test noscript after all. Am I doing something wrong, or is the newest keyboard just two giant summersaults backwards when it comes to the Mkey states and noscripting in general?
https://redd.it/1m8i46r
@r_lua
I'm trying to get a new keyboard to replace my seven year old G910, only two problems...there seems to be no Mkey state for this keyboard, meaning nine macro keys is all you can get, and worse yet my old noscripts don't work at all. This is a major issue because, for some noscripts, it's just too long, and so having to write a noscript is just easier (especially when it comes to adding a comment on what said code is supposed to accomplish), or if you have to move the mouse to a specific place on screen for various actions. Point is noscripting is a real time saver, and I'd like to get it to work, which brings me to my main question: does the Logitech G915 X even allow noscripting in the first place?
I've tried modifying my code from
if (event == "G_PRESSED" and mkey == 1 and arg == 1) thento
if (event == "G_PRESSED" and arg == 1) thenand even
if (event == "G_PRESSED" and arg == G1) thenand none of them will cause the noscript to run, which in this case, is just to press and release a random key on the keyboard, and nothing else...it's a test noscript after all. Am I doing something wrong, or is the newest keyboard just two giant summersaults backwards when it comes to the Mkey states and noscripting in general?
https://redd.it/1m8i46r
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
luau Development (roblox)
Hey! I am very new to luau and i am wondering where i can find some steady information on luau and roblox API. Should i start just learning luau then move onto the roblox api or should i learn the API and luau together?
Thanks.
https://redd.it/1m8pwre
@r_lua
Hey! I am very new to luau and i am wondering where i can find some steady information on luau and roblox API. Should i start just learning luau then move onto the roblox api or should i learn the API and luau together?
Thanks.
https://redd.it/1m8pwre
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
My hyper-minimal command line parser
Sometimes you want to write a noscript that takes command-line arguments, but you don't want to install Luarocks or any dependencies. Here's my 23-line function that makes this just a little bit nicer.
local function cmdMap(cmdArgs)
cmdArgs = cmdArgs or _G.arg
local result, map = {}, {}
for idx, text in ipairs(cmdArgs) do
if text:find("=") then
local name, value = text:match("([^=]+)=(.+)")
value = value:match("[%s'\"]*([^'\"]*)") or value
map[name] = {idx = idx, value = value}
else
map[text] = {idx = idx, value = cmdArgs[idx + 1]}
end
end
function result.empty()
return cmdArgs[1] == nil
end
function result.find(arg, argAlt)
return map[arg] or map[argAlt or -1]
end
function result.value(arg, argAlt)
return (result.find(arg, argAlt) or {}).value
end
return result
end
-- This is how you might use it in a noscript:
local args = cmdMap(arg)
if args.find("--help", "-h") or args.empty() then
print("Write some help here")
os.exit(0)
end
local flag = args.find("--some-flag", "-f")
local setting = args.value("--some-setting", "-s")
print("The flag is: ", flag and true or false, "The setting is: ", setting)
This will handle arguments of boths forms: `--setting x`, `--setting=x`.
https://redd.it/1m8w3e2
@r_lua
Sometimes you want to write a noscript that takes command-line arguments, but you don't want to install Luarocks or any dependencies. Here's my 23-line function that makes this just a little bit nicer.
local function cmdMap(cmdArgs)
cmdArgs = cmdArgs or _G.arg
local result, map = {}, {}
for idx, text in ipairs(cmdArgs) do
if text:find("=") then
local name, value = text:match("([^=]+)=(.+)")
value = value:match("[%s'\"]*([^'\"]*)") or value
map[name] = {idx = idx, value = value}
else
map[text] = {idx = idx, value = cmdArgs[idx + 1]}
end
end
function result.empty()
return cmdArgs[1] == nil
end
function result.find(arg, argAlt)
return map[arg] or map[argAlt or -1]
end
function result.value(arg, argAlt)
return (result.find(arg, argAlt) or {}).value
end
return result
end
-- This is how you might use it in a noscript:
local args = cmdMap(arg)
if args.find("--help", "-h") or args.empty() then
print("Write some help here")
os.exit(0)
end
local flag = args.find("--some-flag", "-f")
local setting = args.value("--some-setting", "-s")
print("The flag is: ", flag and true or false, "The setting is: ", setting)
This will handle arguments of boths forms: `--setting x`, `--setting=x`.
https://redd.it/1m8w3e2
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Is coding Lua noscripts still a good way to make money in 2025?
Hey! I’m a 20 yo computer science student, and I’m looking to add a source of income directly from my computer. I’ve explored a few options already, and Lua noscripting caught my attention, especially because it seems both useful and potentially sellable.
I’ve started learning Lua mainly for FiveM server development, but I know it’s also used in other gaming/modding contexts. Right now, I’m trying to look at all the possibilities before going all in.
This isn’t just a random burst of motivation, I’m ready to put in the work and stay consistent. My goal is simple: use the skills I’m learning as a student (like coding and self-learning) to earn a little extra money from home.
👉 So my questions are:
• Is Lua noscripting still a profitable skill in 2025?
• Are there better alternatives for someone like me (CS student, good at learning, comfortable with code) to make money online?
• If Lua is a good entry point, where should I focus my efforts (FiveM, Roblox, other niches)?
Thanks in advance for any tips, ideas, or experience sharing!
https://redd.it/1m8wzoc
@r_lua
Hey! I’m a 20 yo computer science student, and I’m looking to add a source of income directly from my computer. I’ve explored a few options already, and Lua noscripting caught my attention, especially because it seems both useful and potentially sellable.
I’ve started learning Lua mainly for FiveM server development, but I know it’s also used in other gaming/modding contexts. Right now, I’m trying to look at all the possibilities before going all in.
This isn’t just a random burst of motivation, I’m ready to put in the work and stay consistent. My goal is simple: use the skills I’m learning as a student (like coding and self-learning) to earn a little extra money from home.
👉 So my questions are:
• Is Lua noscripting still a profitable skill in 2025?
• Are there better alternatives for someone like me (CS student, good at learning, comfortable with code) to make money online?
• If Lua is a good entry point, where should I focus my efforts (FiveM, Roblox, other niches)?
Thanks in advance for any tips, ideas, or experience sharing!
https://redd.it/1m8wzoc
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Lahna
https://lahna.burij.de/
I made something fun with htmx and Lua. Readme of the repo explains everything very in detail. Open for feedback.
https://redd.it/1m96skz
@r_lua
https://lahna.burij.de/
I made something fun with htmx and Lua. Readme of the repo explains everything very in detail. Open for feedback.
https://redd.it/1m96skz
@r_lua
Lightweight library for windowing?
I know libraries like LOVE or wxWidgits already exist and are great for making apps with Lua, but I just want something that is specifically for making a window; LOVE, wxWidgets, etc have lots of functionality I don't really want/need. The closest I could find to what I am thinking about is lua-fenster, but it doesn't yet support wayland, which is what I use (One of the main developers, jonasgeiler, said he planned to add wayland support, but it doesn't work when I installed it via LuaRocks). What I was also thinking about was using LuaJIT's ffi functionality and just use a C library, which could also work.
https://redd.it/1m9g8fx
@r_lua
I know libraries like LOVE or wxWidgits already exist and are great for making apps with Lua, but I just want something that is specifically for making a window; LOVE, wxWidgets, etc have lots of functionality I don't really want/need. The closest I could find to what I am thinking about is lua-fenster, but it doesn't yet support wayland, which is what I use (One of the main developers, jonasgeiler, said he planned to add wayland support, but it doesn't work when I installed it via LuaRocks). What I was also thinking about was using LuaJIT's ffi functionality and just use a C library, which could also work.
https://redd.it/1m9g8fx
@r_lua
GitHub
GitHub - jonasgeiler/lua-fenster: 📚 The most minimal cross-platform GUI library - now in Lua!
📚 The most minimal cross-platform GUI library - now in Lua! - jonasgeiler/lua-fenster
Best way to learn
I am wondering what some of your ways to learn lua. I am mostly new with text based programing and I've learned the bare minimum.
https://redd.it/1m9itwl
@r_lua
I am wondering what some of your ways to learn lua. I am mostly new with text based programing and I've learned the bare minimum.
https://redd.it/1m9itwl
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
I created a miniflux plugin for KOReader
A few months back I had this urge to buy a Boox palma just for the only purpose of reading my RSS entries from miniflux but then I remembered that I had other einks (a kobo H2O) and that it would be nice to develop a plugin. Since KOReader is so amazing and open source, I decided to make one and it's been a fun process.
Miniflux KOReader plugin is in a early but very usable stage. The idea of the plugin is to be offline friendly so you can take your entries everywhere you want. You can decide on include the images or not if you prefer so. It also has a custom css to apply as a style tweak that enhance the Reader.
The plugin also has the ability to open images by tapping (no holding as I wanted to open it faster) them, add them into the link dialog if are images inside a link and close it (no zoom in) when using the buttons on the Kobo physical buttons. For the moment those aren't possible to turn off and are hardcoded.
If you don't know miniflux, miniflux is a minimalist and opinionated feed reader that you can host on your own or you can register by a fee on it's website. The minimalistic idea really fits with KOReader environment and who knows, if someday I can buy the Boox palma, I definitely will use this plugin.
Writing Lua has been so much fun. I'm improving several places on my code as now I get to know both Lua and the KOReader core utilities.
Repository: https://github.com/AlgusDark/miniflux.koplugin
https://preview.redd.it/o07m4gi4y7ff1.png?width=1548&format=png&auto=webp&s=e331df499be06965eef5023a098af3f9ab4e4143
https://preview.redd.it/2dhus3j4y7ff1.png?width=1532&format=png&auto=webp&s=f163868fe5dc0981e73a74dfe732d6fae11eceff
https://preview.redd.it/br4whgi4y7ff1.png?width=1550&format=png&auto=webp&s=88cdbaa4ce42ebaf74b670609cb1bfe80e432c00
https://redd.it/1m9t2wq
@r_lua
A few months back I had this urge to buy a Boox palma just for the only purpose of reading my RSS entries from miniflux but then I remembered that I had other einks (a kobo H2O) and that it would be nice to develop a plugin. Since KOReader is so amazing and open source, I decided to make one and it's been a fun process.
Miniflux KOReader plugin is in a early but very usable stage. The idea of the plugin is to be offline friendly so you can take your entries everywhere you want. You can decide on include the images or not if you prefer so. It also has a custom css to apply as a style tweak that enhance the Reader.
The plugin also has the ability to open images by tapping (no holding as I wanted to open it faster) them, add them into the link dialog if are images inside a link and close it (no zoom in) when using the buttons on the Kobo physical buttons. For the moment those aren't possible to turn off and are hardcoded.
If you don't know miniflux, miniflux is a minimalist and opinionated feed reader that you can host on your own or you can register by a fee on it's website. The minimalistic idea really fits with KOReader environment and who knows, if someday I can buy the Boox palma, I definitely will use this plugin.
Writing Lua has been so much fun. I'm improving several places on my code as now I get to know both Lua and the KOReader core utilities.
Repository: https://github.com/AlgusDark/miniflux.koplugin
https://preview.redd.it/o07m4gi4y7ff1.png?width=1548&format=png&auto=webp&s=e331df499be06965eef5023a098af3f9ab4e4143
https://preview.redd.it/2dhus3j4y7ff1.png?width=1532&format=png&auto=webp&s=f163868fe5dc0981e73a74dfe732d6fae11eceff
https://preview.redd.it/br4whgi4y7ff1.png?width=1550&format=png&auto=webp&s=88cdbaa4ce42ebaf74b670609cb1bfe80e432c00
https://redd.it/1m9t2wq
@r_lua
GitHub
GitHub - AlgusDark/miniflux.koplugin: KOReader plugin to access a Miniflux instance to read your RSS feed entries with offline…
KOReader plugin to access a Miniflux instance to read your RSS feed entries with offline capabilities. - AlgusDark/miniflux.koplugin
Introducing the LuaX Development Ecosystem
https://cdsoft.codeberg.page/tools.html
https://redd.it/1m9yopx
@r_lua
https://cdsoft.codeberg.page/tools.html
https://redd.it/1m9yopx
@r_lua
cdsoft.codeberg.page
LuaX-based Development Tools
Como deofuscar moonsec v3
Queria saber se existe um jeito de tirar a proteção do moonsec v3 pra ver o código verdadeiro e não o obfuscado
https://redd.it/1m9y2jk
@r_lua
Queria saber se existe um jeito de tirar a proteção do moonsec v3 pra ver o código verdadeiro e não o obfuscado
https://redd.it/1m9y2jk
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
luajit.odin: Single file .odin bindings for LuaJIT
https://github.com/morikosm/luajit-odin
https://redd.it/1mawlcf
@r_lua
https://github.com/morikosm/luajit-odin
https://redd.it/1mawlcf
@r_lua
GitHub
GitHub - morikosm/luajit-odin: Single file .odin binding for LuaJIT
Single file .odin binding for LuaJIT. Contribute to morikosm/luajit-odin development by creating an account on GitHub.
Aprendiendo luau o lua. Estoy aprendiendo lo básico de lua desde Android no tengo pc, alguna recomendación?
local player = game.Players.LocalPlayer
local gui = Instance.new("ScreenGui")
gui.Parent = player:WaitForChild("PlayerGui")
gui.ResetOnSpawn = false
local speed = Instance.new("TextButton")
speed.Name = "Speed"
speed.Size = UDim2.new(0, 150, 0, 50)
speed.Position = UDim2.new(0, 120, 0, 40)
speed.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
speed.Text = "Speed Off"
speed.Parent = gui
local speedActivo = false
speed.MouseButton1Click:Connect(function()
speedActivo = not speedActivo
if speedActivo then
player.Character.Humanoid.WalkSpeed = 80
speed.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
speed.Text = "Speed On"
else
player.Character.Humanoid.WalkSpeed = 16
speed.Text = "Speed Off"
speed.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
end
end)
https://redd.it/1maxym7
@r_lua
local player = game.Players.LocalPlayer
local gui = Instance.new("ScreenGui")
gui.Parent = player:WaitForChild("PlayerGui")
gui.ResetOnSpawn = false
local speed = Instance.new("TextButton")
speed.Name = "Speed"
speed.Size = UDim2.new(0, 150, 0, 50)
speed.Position = UDim2.new(0, 120, 0, 40)
speed.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
speed.Text = "Speed Off"
speed.Parent = gui
local speedActivo = false
speed.MouseButton1Click:Connect(function()
speedActivo = not speedActivo
if speedActivo then
player.Character.Humanoid.WalkSpeed = 80
speed.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
speed.Text = "Speed On"
else
player.Character.Humanoid.WalkSpeed = 16
speed.Text = "Speed Off"
speed.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
end
end)
https://redd.it/1maxym7
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Feels Like No recoil.
I built this lua noscript for Osa & Thermite's 556XI assault rifle and it feels amazing.
https://reddit.com/link/1mb8u5e/video/03a99na67kff1/player
https://redd.it/1mb8u5e
@r_lua
I built this lua noscript for Osa & Thermite's 556XI assault rifle and it feels amazing.
https://reddit.com/link/1mb8u5e/video/03a99na67kff1/player
https://redd.it/1mb8u5e
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
I need a teacher or partner
Guys, I’m so noob, i know nothing about lua
I just know a little python
Is there some one that s/he like learn with me or teach me?
After that we can do projects together or learn more from each other, if you like do this tell here, if we will be a lot, we can create a group
It can be very enjoyable that you teach to someone or learn with someone
Tnx for read💛🤜🏻🤛🏼
https://redd.it/1mbq10e
@r_lua
Guys, I’m so noob, i know nothing about lua
I just know a little python
Is there some one that s/he like learn with me or teach me?
After that we can do projects together or learn more from each other, if you like do this tell here, if we will be a lot, we can create a group
It can be very enjoyable that you teach to someone or learn with someone
Tnx for read💛🤜🏻🤛🏼
https://redd.it/1mbq10e
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Learning Lua
I was thinking about getting into learning Lua to make games and am already familiar with JavaScript. I was wondering if there are any good resources for that.
https://redd.it/1mbuoes
@r_lua
I was thinking about getting into learning Lua to make games and am already familiar with JavaScript. I was wondering if there are any good resources for that.
https://redd.it/1mbuoes
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community