Skip to main content

Questions tagged [lua]

Lua is a powerful, fast, lightweight, embeddable scripting language. It is dynamically typed, runs by interpreting bytecode, and has automatic garbage collection. Its speed is one of the main reasons it is widely used by the machine learning community. It is often referred to as an "extensible extension language".

0 votes
1 answer
25 views

How to write a float hex literal in GLSL?

I'm trying to use lua gsub to modify a shader file for modding needs: content = ModTextFileGetContent("data/shaders/post_final.frag") ModTextFileSetContent("data/shaders/post_final.frag&...
ImmortalDamned's user avatar
0 votes
0 answers
15 views

redis lua script can't call on global

local function get_cur_time() local current_time = redis.call('TIME')[1] local current_minute_start = math.floor(current_time / 60) * 60 return current_minute_start end -- add below line ...
Mithril's user avatar
  • 13.5k
0 votes
0 answers
25 views

Lua scripting being used in mouse macro. (logitech)

I have a Lua script for Logitech G Hub that moves my mouse for me. It's set to use MB4 for that. I want to remap MB5 to press shift, mb4. But when I have the script running and press MB5, it only ...
newguy's user avatar
  • 1
0 votes
0 answers
19 views

Lua: Assistance Needed in Using Inheritance in conjunction with case-insensitive metatables/metamethods? Doable?

I've been trying to wrap my head around utilizing inheritance with Lua (https://www.lua.org/pil/16.2.html and Case insensitive array in Lua as references) but also integrating a case-insensitive ...
Spiderkeg's user avatar
0 votes
0 answers
12 views

Ghub buggy on g600?

I recently discovered the world of lua and I'm testing simple macros to improve the language. When I discovered that GHUB uses lua to make scripts, I tried to do something simple to hold recoil in any ...
Zend's user avatar
  • 1
0 votes
0 answers
29 views

Premake5 - cppdialect is ignored while creating project for VS2022

I'm trying to compile Sciter from a command line batch, using the Visual Studio 2022 compiler. For that reason I need to generate the VS2022 projects using Premake5. However Sciter needs to be ...
Jean-Milost Reymond's user avatar
1 vote
0 answers
22 views

Can I change the default hash function?

I is possible to change the default hash function that lua (or luajit) uses for the HashTable part of a talbe ? I want to speedup table access in pure Lua. I saw that: The Default hash function for ...
Benjamin V's user avatar
1 vote
0 answers
16 views

Neovim BiomeJS not using biome.json formatting

My lsp.lua is as follows: local util = require("lspconfig.util") return { { "williamboman/mason.nvim", opts = function(_, opts) vim.list_extend(opts....
Owenn's user avatar
  • 1,060
0 votes
0 answers
10 views

Img loading error | GLua | Garrys mod HUD

I can't add an image to my HUD in GLUA. I've tried to do it in the code, and I think it should work, but it doesn't. I have the correct type of image and its format. Folders hud |---lua | |---...
ART0022VI's user avatar
0 votes
1 answer
21 views

My Script inside my model's part doesn't run when I clone it

This is my code for spawning in the model itself which is located in ReplicatedStorage, which this is the hierarchy: SpawnDoor (Model) Door (Sound) Light (Folder) Door1 (Part) Door2 (Part) Part (Part) ...
Sergei Ivlev's user avatar
-3 votes
1 answer
56 views

What does index nil mean? [closed]

I attempted to mess around with the children because I think that's the problem but I was unsuccessful local tycoon = script.Parent.Parent local mainItems = tycoon:FindFirstChild("MainItems"...
RandomCoder's user avatar
0 votes
1 answer
26 views

How can I run the Wikipedia Module Yesno.lua from the lua cli?

Wikipedia has lua modules. One of them is the Yesno module. Its Yesno.lua file has these contents. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes&...
gettimothy's user avatar
1 vote
1 answer
23 views

How to Apply the Same Skin to All Players in Roblox?

I am experimenting in Roblox Studio, and I want to create a logic that would give all players the same skin. (All players must look the same during gameplay.) I found two options: First option: Drag ...
Stalker's user avatar
  • 13
-3 votes
0 answers
69 views

I am currently trying to develop a Roblox game;, would somebody be able to help me with locate a module?

This is a module script, it is in ServerScriptService: local PlayerDataHandler = {} local dataTemplate = { Race = "", Cash = 0, Inventory = {}, Level = 0, } local ...
Sergei Ivlev's user avatar
0 votes
1 answer
67 views

Inline conversion of headers from RTF to HTML with Pandoc

I have an rtf file that, ultimately, I want to convert into a chunked html, splitting on the level 1 headings. My first step is to convert the rtf to one html file, which is straightforward with: ...
Packwood's user avatar
  • 287

15 30 50 per page
1
2 3 4 5
1521