How to start?
Hey, I want learn Lua on the I Pad, how should I start (With which app) and are there any good Videos or playlist on You tube to Help me?
https://redd.it/1gm1z3c
@r_lua
Hey, I want learn Lua on the I Pad, how should I start (With which app) and are there any good Videos or playlist on You tube to Help me?
https://redd.it/1gm1z3c
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
The function that I like in Lua
< Python >
< Lua >
I think it is beneficial to view entire logic.
What else?
https://redd.it/1gmft0z
@r_lua
< Python >
if try == 0: self:Reset() return < Lua >
if try == 0 then self:Reset() return endI think it is beneficial to view entire logic.
What else?
https://redd.it/1gmft0z
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
How to install Lua on macOS 14?
I am extremely interested into learning Lua, but I prefer using macOS. Is there any way to install Lua on a MacBook? By the way, what's the most recommended IDE for Lua?
https://redd.it/1gmit2b
@r_lua
I am extremely interested into learning Lua, but I prefer using macOS. Is there any way to install Lua on a MacBook? By the way, what's the most recommended IDE for Lua?
https://redd.it/1gmit2b
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Help with Removing the Dot in Modern X Progress Bar (Lua Extension for MPV)
Help with Removing the Dot in Modern X Progress Bar (Lua Extension for MPV)
Hi everyone!
I’m using the ModernX interface for MPV, which is Lua-based. However, I’m trying to remove a dot in the progress bar that I find distracting. Does anyone know how to adjust this in the Lua code?
https://preview.redd.it/b3gr9a4p2uzd1.png?width=130&format=png&auto=webp&s=7b1494c28f3564717b473b6c0957407f1b4bccfe
I Use an older version of this so please download this from the google drive.
https://drive.google.com/file/d/1fFXiYIHrp0RlKLIRAs5fBIPvVMuaJDdL/view?usp=sharing
Sorry for the bother i cant upload it form here, i promise it is not a virus just a Lua. Google can scan it.
https://preview.redd.it/xtnnqdy05uzd1.png?width=2007&format=png&auto=webp&s=0efb66cf0f4c61007d8f94e6babec74f599e04fb
You can check with virus total too. it is safe
However this is the github for this extension it self
https://github.com/zydezu/ModernX/blob/main/modernx.lua
Would really appreciate any insights from those familiar with tweaking Lua for MPV!
Thanks in advance!
https://redd.it/1gn5inb
@r_lua
Help with Removing the Dot in Modern X Progress Bar (Lua Extension for MPV)
Hi everyone!
I’m using the ModernX interface for MPV, which is Lua-based. However, I’m trying to remove a dot in the progress bar that I find distracting. Does anyone know how to adjust this in the Lua code?
https://preview.redd.it/b3gr9a4p2uzd1.png?width=130&format=png&auto=webp&s=7b1494c28f3564717b473b6c0957407f1b4bccfe
I Use an older version of this so please download this from the google drive.
https://drive.google.com/file/d/1fFXiYIHrp0RlKLIRAs5fBIPvVMuaJDdL/view?usp=sharing
Sorry for the bother i cant upload it form here, i promise it is not a virus just a Lua. Google can scan it.
https://preview.redd.it/xtnnqdy05uzd1.png?width=2007&format=png&auto=webp&s=0efb66cf0f4c61007d8f94e6babec74f599e04fb
You can check with virus total too. it is safe
However this is the github for this extension it self
https://github.com/zydezu/ModernX/blob/main/modernx.lua
Would really appreciate any insights from those familiar with tweaking Lua for MPV!
Thanks in advance!
https://redd.it/1gn5inb
@r_lua
Bug Fixing for an OBS timer?
I'm trying to create a timer counter for OBS paired with a distance counter (Think "I walked 10 feet in 10 minutes".
What's odd is that it's working entirely for my OBS... And not anyone else??
I can run it well on my computer but if anyone else tries it, it either crashes their OBS, gives them a very strange number, or keeps counting without correctly adding the distance interval.
I've been trying to fix it for hours, but it's hard to debug when I can't seem to test it on my own computer. I'm very tired and there's a time limit to it, so I can't keep running random trials and asking my friends to test it. Could someone review my code and pinpoint why it may be continuing to count the time without adding distance when prompted?
https://redd.it/1gn7uzl
@r_lua
I'm trying to create a timer counter for OBS paired with a distance counter (Think "I walked 10 feet in 10 minutes".
What's odd is that it's working entirely for my OBS... And not anyone else??
I can run it well on my computer but if anyone else tries it, it either crashes their OBS, gives them a very strange number, or keeps counting without correctly adding the distance interval.
I've been trying to fix it for hours, but it's hard to debug when I can't seem to test it on my own computer. I'm very tired and there's a time limit to it, so I can't keep running random trials and asking my friends to test it. Could someone review my code and pinpoint why it may be continuing to count the time without adding distance when prompted?
obs = obsluadistance = 0 time_elapsed = 0 interval = 9 * 60 distance_increment = 1 timer_started = false last_time = 0 text_source_name = ""timer_interval = 1000function noscript_denoscription()return "Increments a distance counter by a specified amount every set interval. Displays Time and Distance."endfunction noscript_properties()local props = obs.obs_properties_create()obs.obs_properties_add_int(props, "interval", "Interval (minutes)", 1, 1440, 1)obs.obs_properties_add_int(props, "distance_increment", "Distance Increment", 1, 100, 1)obs.obs_properties_add_text(props, "text_source", "Text Source Name", obs.OBS_TEXT_DEFAULT)obs.obs_properties_add_button(props, "start_button", "Start", start_button)obs.obs_properties_add_button(props, "stop_button", "Stop", stop_button)obs.obs_properties_add_button(props, "reset_button", "Reset", reset_button)return propsendfunction noscript_update(settings)interval = obs.obs_data_get_int(settings, "interval") * 60distance_increment = obs.obs_data_get_int(settings, "distance_increment")text_source_name = obs.obs_data_get_string(settings, "text_source")obs.noscript_log(obs.LOG_INFO, "Interval set to: " .. interval .. " seconds")obs.noscript_log(obs.LOG_INFO, "Distance increment set to: " .. distance_increment)obs.noscript_log(obs.LOG_INFO, "Text source name: " .. text_source_name)endfunction start_button()if not timer_started thenlast_time = os.time()obs.timer_add(timer_callback, timer_interval)timer_started = trueobs.noscript_log(obs.LOG_INFO, "Timer started.")elseobs.noscript_log(obs.LOG_INFO, "Timer already running.")endendfunction stop_button()if timer_started thenobs.timer_remove(timer_callback)timer_started = falseobs.noscript_log(obs.LOG_INFO, "Timer stopped.")elseobs.noscript_log(obs.LOG_WARNING, "Timer not running.")endendfunction reset_button()distance, time_elapsed = 0, 0update_text_source()obs.noscript_log(obs.LOG_INFO, "Distance and Time reset.")endfunction timer_callback()if not timer_started then return endlocal current_time = os.time()local time_diff = current_time - last_timelast_time = current_timetime_elapsed = time_elapsed + time_diffif time_elapsed >= interval thendistance = distance + distance_incrementtime_elapsed = time_elapsed - interval obs.noscript_log(obs.LOG_INFO, "Distance updated to: " .. distance .. " km after interval reached.")endupdate_text_source()endfunction update_text_source()local source = obs.obs_get_source_by_name(text_source_name)if source thenlocal settings = obs.obs_data_create()local minutes, seconds = math.floor(time_elapsed / 60), time_elapsed % 60local time_string = string.format("Time: %d:%02d\nDistance: %d km", minutes, seconds, distance)obs.obs_data_set_string(settings, "text", time_string)obs.obs_source_update(source, settings)obs.obs_data_release(settings)obs.obs_source_release(source)elseobs.noscript_log(obs.LOG_WARNING, "Text source not found.")endendhttps://redd.it/1gn7uzl
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
What Roblox game should I make?
I want to be a developer, and I think roblox is a good way to start. Do any of you know some good game ideas for me? PS: I am a solo developer
https://redd.it/1gn9hjq
@r_lua
I want to be a developer, and I think roblox is a good way to start. Do any of you know some good game ideas for me? PS: I am a solo developer
https://redd.it/1gn9hjq
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
I want to learn lua
Hello,I want to start learning lua to make games,and idk how I should learn it,i decided on using notepad++ (tell me if there are any better softwares to code in) and idk if I should use this one and learn from youtube videos ,or use roblox and youtube to learn it
https://redd.it/1gndt21
@r_lua
Hello,I want to start learning lua to make games,and idk how I should learn it,i decided on using notepad++ (tell me if there are any better softwares to code in) and idk if I should use this one and learn from youtube videos ,or use roblox and youtube to learn it
https://redd.it/1gndt21
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Lua Pandoc Citation Modifier
I'm trying to create a lua noscript that does the following with pandoc and its internal citeproc:
The current input is: \`(MPD; \[@Somereference2020 noparens\])\`
The desired output is: \`(MPD; Somereference, 2020)\` with the correct internal link to citeproc references.
I'm close, but I can't seem to wrangle removing the preceding space before \`noparens\` on the output.
Current output is: \`(MPD; Somereference, 2020 )\`
Note the space after the year which I've been able to debug to being the preceding space before the \`noparens\` (based on the debug output with carrots).
Thanks in advance to the Lua ninja ... Here's the code
function Cite(cite)
for i, citation in ipairs(cite.citations) do
if citation.suffix and pandoc.utils.stringify(citation.suffix):match("noparens") then
-- Debugging: Print the original suffix
print("Original suffix:", pandoc.utils.stringify(citation.suffix))
-- Remove 'noparens' from the suffix
local new_suffix = pandoc.List{}
for _, item in ipairs(citation.suffix) do
if item.t == "Str" then
-- Remove 'noparens' and trim spaces/commas
item.text = item.text:gsub("noparens", ""):gsub("^%s*,%s*", ""):gsub("%s*,%s*$", "")
if item.text ~= "" then
new_suffix:insert(item)
end
else
new_suffix:insert(item)
end
end
citation.suffix = new_suffix
-- Debugging: Print the modified suffix
print("Modified suffix:", pandoc.utils.stringify(citation.suffix))
-- Debugging: Print the original content
print("Original content:", pandoc.utils.stringify(cite.content))
-- Remove 'noparens' and unnecessary parentheses from the content
local new_content = pandoc.List{}
for _, item in ipairs(cite.content) do
if item.t == "Str" then
-- Remove 'noparens' and parentheses
item.text = item.text:gsub("noparens", ""):gsub("%(", ""):gsub("%)", ""):gsub("^%s*,%s*", ""):gsub("%s*,%s*$", "")
end
if item.text ~= "" then
new_content:insert(item)
end
end
cite.content = new_content
-- Debugging: Print the modified content
print("Modified citation: ^" .. pandoc.utils.stringify(cite) .. "^")
return cite
end
end
end
https://redd.it/1go35uf
@r_lua
I'm trying to create a lua noscript that does the following with pandoc and its internal citeproc:
The current input is: \`(MPD; \[@Somereference2020 noparens\])\`
The desired output is: \`(MPD; Somereference, 2020)\` with the correct internal link to citeproc references.
I'm close, but I can't seem to wrangle removing the preceding space before \`noparens\` on the output.
Current output is: \`(MPD; Somereference, 2020 )\`
Note the space after the year which I've been able to debug to being the preceding space before the \`noparens\` (based on the debug output with carrots).
Thanks in advance to the Lua ninja ... Here's the code
function Cite(cite)
for i, citation in ipairs(cite.citations) do
if citation.suffix and pandoc.utils.stringify(citation.suffix):match("noparens") then
-- Debugging: Print the original suffix
print("Original suffix:", pandoc.utils.stringify(citation.suffix))
-- Remove 'noparens' from the suffix
local new_suffix = pandoc.List{}
for _, item in ipairs(citation.suffix) do
if item.t == "Str" then
-- Remove 'noparens' and trim spaces/commas
item.text = item.text:gsub("noparens", ""):gsub("^%s*,%s*", ""):gsub("%s*,%s*$", "")
if item.text ~= "" then
new_suffix:insert(item)
end
else
new_suffix:insert(item)
end
end
citation.suffix = new_suffix
-- Debugging: Print the modified suffix
print("Modified suffix:", pandoc.utils.stringify(citation.suffix))
-- Debugging: Print the original content
print("Original content:", pandoc.utils.stringify(cite.content))
-- Remove 'noparens' and unnecessary parentheses from the content
local new_content = pandoc.List{}
for _, item in ipairs(cite.content) do
if item.t == "Str" then
-- Remove 'noparens' and parentheses
item.text = item.text:gsub("noparens", ""):gsub("%(", ""):gsub("%)", ""):gsub("^%s*,%s*", ""):gsub("%s*,%s*$", "")
end
if item.text ~= "" then
new_content:insert(item)
end
end
cite.content = new_content
-- Debugging: Print the modified content
print("Modified citation: ^" .. pandoc.utils.stringify(cite) .. "^")
return cite
end
end
end
https://redd.it/1go35uf
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
GSoC 2024 Final Report: Lua UNO language binding in LibreOffice
https://gist.github.com/VenetiaFurtado/08c232bfa39cacda134bb0a978bb7398
https://redd.it/1go6b2c
@r_lua
https://gist.github.com/VenetiaFurtado/08c232bfa39cacda134bb0a978bb7398
https://redd.it/1go6b2c
@r_lua
Gist
GSoC 2024 Final Report - Venetia Furtado
GSoC 2024 Final Report - Venetia Furtado. GitHub Gist: instantly share code, notes, and snippets.
(Garry's Mod) Make noscripted entity always grabbable with Gravity Gun
I'm writing a noscripted entity and need it to be always grabbable with the gravity gun. I tried using the GravGunPickupAllowed entity hook for that, but that didn't work. It can be picked up when the gravity gun is supercharged, presumably because it has a higher weight limit, but I need the entity to be able to be picked up by the regular gravity gun without changing the entity's weight. Is there any way I could do such a thing?
https://redd.it/1gogh4m
@r_lua
I'm writing a noscripted entity and need it to be always grabbable with the gravity gun. I tried using the GravGunPickupAllowed entity hook for that, but that didn't work. It can be picked up when the gravity gun is supercharged, presumably because it has a higher weight limit, but I need the entity to be able to be picked up by the regular gravity gun without changing the entity's weight. Is there any way I could do such a thing?
https://redd.it/1gogh4m
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
How to learn
Guys can anyone tell me where you guys know/learn noscripting Lua? I wanna create random stuff
https://redd.it/1gowj2r
@r_lua
Guys can anyone tell me where you guys know/learn noscripting Lua? I wanna create random stuff
https://redd.it/1gowj2r
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
How to compile?
Yes, I know there is luac.exe, but thats not what I need.
I have a lua noscript that uses modules I installed from LuaRocks. How can I compile my noscript so that all required modules are compiled with it, so that anyone can run the compiled code, even without anything lua-related installed?
https://redd.it/1gp8sb6
@r_lua
Yes, I know there is luac.exe, but thats not what I need.
I have a lua noscript that uses modules I installed from LuaRocks. How can I compile my noscript so that all required modules are compiled with it, so that anyone can run the compiled code, even without anything lua-related installed?
https://redd.it/1gp8sb6
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Всем привет,ищу профессионального скриптера на данный момент.
\# Всем привет,ищу профессионального скриптера на данный момент.
**В команде в данный момент-профессиональный vfx artist и профессиональный 3д моделлер/мап билдер**
Идея-как только форситься игра в стиме по типу лонг драйв,или хайп по типу скибиди толчков мы начинаем создавать сырую пародию,к примеру-Fisch,toilet tower defence,a long drive,dusty trip. И постим игру сырой.Как только запостили мы начинаем её рекламить и по тихоньку делать обновы если онлайн растёт,получать мы будем процентами,пример:
2к онлайна 5 минутные сессии(100к робуксов в день)
https://redd.it/1gphju3
@r_lua
\# Всем привет,ищу профессионального скриптера на данный момент.
**В команде в данный момент-профессиональный vfx artist и профессиональный 3д моделлер/мап билдер**
Идея-как только форситься игра в стиме по типу лонг драйв,или хайп по типу скибиди толчков мы начинаем создавать сырую пародию,к примеру-Fisch,toilet tower defence,a long drive,dusty trip. И постим игру сырой.Как только запостили мы начинаем её рекламить и по тихоньку делать обновы если онлайн растёт,получать мы будем процентами,пример:
2к онлайна 5 минутные сессии(100к робуксов в день)
https://redd.it/1gphju3
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
What program to use for lua
i found out about lua but idk where to start, i dont know which program to use and where to learn the lua programing language T_T
https://redd.it/1gpi7mb
@r_lua
i found out about lua but idk where to start, i dont know which program to use and where to learn the lua programing language T_T
https://redd.it/1gpi7mb
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
what is wrong with this code why doesn't it work? i started learning noscripting today and was trying functions
local baseplate = game.Workspace.Baseplate
local function changebaseplate()
baseplate.Material = "pebble"
end
changebaseplate()
https://redd.it/1gpont5
@r_lua
local baseplate = game.Workspace.Baseplate
local function changebaseplate()
baseplate.Material = "pebble"
end
changebaseplate()
https://redd.it/1gpont5
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Rainmeter skin not working properly when I try to call a Lua function
The code (look at MeasureInPercent):
Rainmeter
Update=1000
Author=Connect-R
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
AccurateText=1
MouseScrollUpAction=!SetVariable Scale "(#Scale#+#ScrollMouseIncrement#)"!WriteKeyValue Variables Scale "(#Scale#+#ScrollMouseIncrement#)"!Refresh
MouseScrollDownAction=!SetVariable Scale "(#Scale#-#ScrollMouseIncrement# < 0.2 ? 0.2 : #Scale#-#ScrollMouseIncrement#)"!WriteKeyValue Variables Scale "(#Scale#-#ScrollMouseIncrement# < 0.2 ? 0.2 : #Scale#-#ScrollMouseIncrement#)"!Refresh
Variables
@include=#@#Variables.inc
@include2=#@#Language\#Language#.inc
Scale=0.87
;-------------------------------------------------------------
;-------------------------------------------------------------
MeasureTime
Measure=Time
Format="%#Format#:%M"
MeasureAMPM
Measure=Time
Format="%p"
MeasureTimeOfDay
Measure=Time
Format="%H"
Substitute=#TimeOfDay#
;-------------------------------------------------------------
;-------------------------------------------------------------
MeasureHours
Measure=Time
Format=%H
MeasureMinutes
Measure=Time
Format=%M
MeasureSeconds
Measure=Time
Format=%S
;-------------------------------------------------------------
;-------------------------------------------------------------
AdjustedTimeScript
Measure=Script
ScriptFile=#@#\LuaScript\AdjustedTime.lua
MeasureTotalSeconds
Measure=Calc
Formula=(MeasureHours3600)+(MeasureMinutes60)+(MeasureSeconds)
MeasureInPercent
Measure=String
Formula=&AdjustedTimeScript:CalculatePercentage([&MeasureHours, &MeasureMinutes, &MeasureSeconds)]
DynamicVariables=1
;-------------------------------------------------------------
;-------------------------------------------------------------
Meter24h
Meter=String
MeasureName=MeasureTime
MeasureName2=MeasureTimeOfDay
MeasureName3=MeasureInPercent
StringAlign=Center
FontColor=#Color4#
FontFace=Quicksand Regular
FontSize=(20#Scale#)
X=(600#Scale#)
Y=(0#Scale#)
Text="Time: %1, %2.#CRLF# Day Progress: %3% ."
AntiAlias=1
NumOfDecimals=0
Percentual=1
Hidden=#Hidden#
[Meter12h]
Meter=String
MeasureName=MeasureTime
MeasureName2=MeasureAMPM
MeasureName3=MeasureTimeOfDay
MeasureName4=MeasureInPercent
StringAlign=Center
FontColor=#Color4#
FontFace=Quicksand Regular
FontSize=(100#Scale#)
X=(600#Scale#)
Y=(0#Scale#)
Text="#Time:# %1 %2 #,# %3.#CRLF# Day Progress: %4% ."
AntiAlias=1
NumOfDecimals=0
Percentual=1
Hidden=#Hidden2#
The Lua Script:
function CalculatePercentage(hours, minutes, seconds)
if hours >= 4 and hours < 8 then
return "Time to Sleep."
elseif hours < 4 then
hours = hours + 16
end
local totalSeconds = (hours 3600) + (minutes 60) + seconds
abc = (totalSeconds / (86400 - 4 3600)) 100
return toString(abc)
end
I genuinely have no idea what I am doing wrong. Having an experience programming in Java, C, Python, Lua seems easy, but I really can't call it properly or make it return a value.
What should I do?
https://redd.it/1gqc2uu
@r_lua
The code (look at MeasureInPercent):
Rainmeter
Update=1000
Author=Connect-R
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
AccurateText=1
MouseScrollUpAction=!SetVariable Scale "(#Scale#+#ScrollMouseIncrement#)"!WriteKeyValue Variables Scale "(#Scale#+#ScrollMouseIncrement#)"!Refresh
MouseScrollDownAction=!SetVariable Scale "(#Scale#-#ScrollMouseIncrement# < 0.2 ? 0.2 : #Scale#-#ScrollMouseIncrement#)"!WriteKeyValue Variables Scale "(#Scale#-#ScrollMouseIncrement# < 0.2 ? 0.2 : #Scale#-#ScrollMouseIncrement#)"!Refresh
Variables
@include=#@#Variables.inc
@include2=#@#Language\#Language#.inc
Scale=0.87
;-------------------------------------------------------------
;-------------------------------------------------------------
MeasureTime
Measure=Time
Format="%#Format#:%M"
MeasureAMPM
Measure=Time
Format="%p"
MeasureTimeOfDay
Measure=Time
Format="%H"
Substitute=#TimeOfDay#
;-------------------------------------------------------------
;-------------------------------------------------------------
MeasureHours
Measure=Time
Format=%H
MeasureMinutes
Measure=Time
Format=%M
MeasureSeconds
Measure=Time
Format=%S
;-------------------------------------------------------------
;-------------------------------------------------------------
AdjustedTimeScript
Measure=Script
ScriptFile=#@#\LuaScript\AdjustedTime.lua
MeasureTotalSeconds
Measure=Calc
Formula=(MeasureHours3600)+(MeasureMinutes60)+(MeasureSeconds)
MeasureInPercent
Measure=String
Formula=&AdjustedTimeScript:CalculatePercentage([&MeasureHours, &MeasureMinutes, &MeasureSeconds)]
DynamicVariables=1
;-------------------------------------------------------------
;-------------------------------------------------------------
Meter24h
Meter=String
MeasureName=MeasureTime
MeasureName2=MeasureTimeOfDay
MeasureName3=MeasureInPercent
StringAlign=Center
FontColor=#Color4#
FontFace=Quicksand Regular
FontSize=(20#Scale#)
X=(600#Scale#)
Y=(0#Scale#)
Text="Time: %1, %2.#CRLF# Day Progress: %3% ."
AntiAlias=1
NumOfDecimals=0
Percentual=1
Hidden=#Hidden#
[Meter12h]
Meter=String
MeasureName=MeasureTime
MeasureName2=MeasureAMPM
MeasureName3=MeasureTimeOfDay
MeasureName4=MeasureInPercent
StringAlign=Center
FontColor=#Color4#
FontFace=Quicksand Regular
FontSize=(100#Scale#)
X=(600#Scale#)
Y=(0#Scale#)
Text="#Time:# %1 %2 #,# %3.#CRLF# Day Progress: %4% ."
AntiAlias=1
NumOfDecimals=0
Percentual=1
Hidden=#Hidden2#
The Lua Script:
function CalculatePercentage(hours, minutes, seconds)
if hours >= 4 and hours < 8 then
return "Time to Sleep."
elseif hours < 4 then
hours = hours + 16
end
local totalSeconds = (hours 3600) + (minutes 60) + seconds
abc = (totalSeconds / (86400 - 4 3600)) 100
return toString(abc)
end
I genuinely have no idea what I am doing wrong. Having an experience programming in Java, C, Python, Lua seems easy, but I really can't call it properly or make it return a value.
What should I do?
https://redd.it/1gqc2uu
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community