Category "lua"

percentage calculation with negative integers LUA [ANWSERED]

problem: -4% = 0 0% = 5000 How do I make it so that i can calculate both the negative and positive values? What i've tried: local nrstate = "-" local x = therm

C++ Lua access violation when table size is above treshold

Recently I became Lua expert in my team due to an issue occurring when we want to send a large table to the following function: int native_sl_shootlaserpulse(

Mutex in WRK lua script

I have the following script in Lua (custom.lua): local data = loadFile() local count = -1 request = function() url_path = "/resource" -- lock count

main:lua attempt to call box2d_init a nil value, why?

EDIT: obviously I didnt install the library correctly? (my version of love is 11.4). perhaps i should rename the question to how do i properly install this libr

bad argument #1 to 'insert' (table expected, got nil)

I have a problem with lockpick on my gmod dark rp server, can you help me please? error: [plogs] addons/plogs/lua/plogs/core_sv.lua:87: bad argument #1 to 'inse

How to truncate text but backwards?

I want to achieve something like this: I give function a string that should be trunctated and a maximum number of characters. local function TruncateBackwards(

Roblox Item is lagging

I add a mesh to follow the player where ever he goes. But the mesh is lagging a bit when the player runs. I understand that it is not rendering quickly enough,

roblox LUA Expected 'end' (to close 'than' at line 3), got '='

function teleportTo(placeCFrame) local plyr = game.Players.LocalPlayer; if plyr.Character then return plyr.Character.HumanoidRootPart.CFrame = p

what version of Lua does raylib use

When I try to use raylib with lua + zerobrane it says it can't require it , here is the output from zerobrane. would not let me copy output but I think you get

Converting a steam hex into steam community id

I am using lua FiveM to get steam hex of a player but i want to convert that hex to a community id like 76561198364192600. How do i got about that? is there an

Split an object based on other intersecting objects

I'm trying to create a wall placement system a kin to Sims, and am having trouble figuring out how to split the wall if you put another wall perpendicular to it

Trouble running the 'sudo docker-compose up' command

Image of the error I am trying to run the 'sudo docker-compose up' command to start some services. Recently, I created some new services, but I keep getting the

LUA psvita TOUCH boton

I'm learning Lua, but I don't understand how to create a button? http://onelua.x10.mx/vita/docs/es/group__touch.html my reference if touch.front.count(

"Failed to initialize Lua VM with Passenger on Docker

I'm trying to setup a development environment that uses docker but the passenger docker image gives me this error over and over again. [1] development-passenger

How do I anchor a part in Roblox Studio without anchoring it?

I made a small test boat for my tower defense game and I need the turret to rotate but not the rest of the boat and I can't anchor the boat because of network o

How to configure alpha.nvim?

I have an init.lua file that contains: require "user.setup.alpha" as in: require "user.options" require "user.keymaps" require "user.autocmds"

How do I match a string with "-" in it with LUA?

I am trying to match text in between two strings. So far, this works well on 'find1', but 'find2' produces an error. Example1: find1 = cmd:match("<model>(

My if statement isn't working even when condition is met. Roblox Lua

So here is the rundown of my code: while _waveActive do wait(1) for i, _spwn in pairs(_spawns:GetChildren()) do if _spwn:IsA("BasePart") and _zo

Decompile apk game built in corona sdk

A long time ago, I and a friend did a mini-game with corona sdk. We lost the source code and this week I finded the apk lost here. I tried extract the .apk with

My cash value is suppose to go up every minute but its not. (Roblox Studio lua error)

I was trying to re-edit the code over and over again but it still didn't work I've created the folder leader stats and when I play the game it shows that it's a