so I want to understand what this percentage means
I have went on the roblox hub to learn more about string.format but well in this case the % isn’t inside the 1st argument of string.format and their is not specifier
function Format(Int)
return string.format("%02i", Int)
end
function convertToHMS(Seconds)
local Minutes = (Seconds - Seconds%60)/60 --what does the percentage here mean?near the 60
Seconds = Seconds - Minutes*60
local Hours = (Minutes - Minutes%60)/60
Minutes = Minutes - Hours*60
return Format(Hours)..":"..Format(Minutes)..":"..Format(Seconds)
end
In the first function, the ‘%’ denotes a string pattern to format the number into an integer that is padded to the left with zeros to be two characters long.
In the second, the symbol represents the modulus operator. It returns the remainder of two numbers being divided.