Check first bit in string
I have a 4 character string that consists of a single bit boolean value, followed by an unsigned 31 bit value.
I need to check what the boolean value is, what's the best way to do this?
At first I figured I could simply interpret it as a signed 32 bit value and then check if it is positive or negative, something like this:
local s32 = string.unpack("<i4", string)
if s32 < 0 then
return true
else
return false
end
But then I realised, if the 31 bit integer is zero, then wouldn't the resulting 32 bit integer be -0? And since -0 is equal to 0 then s32 < 0 would have to evaluate to false, right?
https://redd.it/1mixp1p
@r_lua
I have a 4 character string that consists of a single bit boolean value, followed by an unsigned 31 bit value.
I need to check what the boolean value is, what's the best way to do this?
At first I figured I could simply interpret it as a signed 32 bit value and then check if it is positive or negative, something like this:
local s32 = string.unpack("<i4", string)
if s32 < 0 then
return true
else
return false
end
But then I realised, if the 31 bit integer is zero, then wouldn't the resulting 32 bit integer be -0? And since -0 is equal to 0 then s32 < 0 would have to evaluate to false, right?
https://redd.it/1mixp1p
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Is it possible to deobfuscate Luraph-obfuscated Roblox noscripts?
Hi everyone,
I have some Roblox Lua noscripts that were obfuscated using Luraph, and I’m trying to understand if there’s a reliable way or any tools to deobfuscate or decode them back to a more readable form.
Has anyone worked with Luraph obfuscation before or knows methods to reverse or decode these noscripts? Any guidance, tools, or resources would be greatly appreciated!
Thanks in advance!
https://redd.it/1mjdfuq
@r_lua
Hi everyone,
I have some Roblox Lua noscripts that were obfuscated using Luraph, and I’m trying to understand if there’s a reliable way or any tools to deobfuscate or decode them back to a more readable form.
Has anyone worked with Luraph obfuscation before or knows methods to reverse or decode these noscripts? Any guidance, tools, or resources would be greatly appreciated!
Thanks in advance!
https://redd.it/1mjdfuq
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
First mini program in Lua
I don't know if I should be posting this on here, but I followed a tutorial to make a basic calculator program using Lua. It's really basic, but my end goal is to make a basic game in Lua using Love2D, and I just wanted to start with something basic. The code is here:
https://redd.it/1mkdpvy
@r_lua
I don't know if I should be posting this on here, but I followed a tutorial to make a basic calculator program using Lua. It's really basic, but my end goal is to make a basic game in Lua using Love2D, and I just wanted to start with something basic. The code is here:
function adding(x, y) return x + y end function subtraction(x, y) return x - y end function calculate(x, y, f) return f(x, y) end print("enter a number") local x = io.read("*n" , "*l") print("enter another number") local y = io.read("*n", "*l") print("Do you need to add or subtract? (Type + or -) ") local op = io.read(1, "*l") if op == "-" then operation = subtraction else operation = adding end print(calculate(x, y, operation))https://redd.it/1mkdpvy
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Help with uniforms
So I am making a war game and I need help with uniforms. One is model and another is folder. Photo is in the link.
https://preview.redd.it/sjsf5dyb9rhf1.png?width=1920&format=png&auto=webp&s=45876bdec80e5c7b5dbf4f669a851fca5316cbb6
https://redd.it/1mkplpg
@r_lua
So I am making a war game and I need help with uniforms. One is model and another is folder. Photo is in the link.
https://preview.redd.it/sjsf5dyb9rhf1.png?width=1920&format=png&auto=webp&s=45876bdec80e5c7b5dbf4f669a851fca5316cbb6
https://redd.it/1mkplpg
@r_lua
Math question
How do you feel about this way of solving 2 variabled math equations?
local num1 = 4
local num2 = 3
local sub = "+"
local function mul(a, b, op)
return loadstring("return " .. a .. op .. b)()
end
local success, result = pcall(mul, num1, num2, sub)
if success then
print(result)
else
warn("error")
end
https://redd.it/1mkqc7j
@r_lua
How do you feel about this way of solving 2 variabled math equations?
local num1 = 4
local num2 = 3
local sub = "+"
local function mul(a, b, op)
return loadstring("return " .. a .. op .. b)()
end
local success, result = pcall(mul, num1, num2, sub)
if success then
print(result)
else
warn("error")
end
https://redd.it/1mkqc7j
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Are there any free luraph obfuscators out there? The site I was using patched free luraph obfuscation smh
It was panda development
https://redd.it/1mkz2w6
@r_lua
It was panda development
https://redd.it/1mkz2w6
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community