Quote: "What does the * etc do?"
it's basically 10 x 60
10 minutes = 10 x 60 seconds
Quote: "if not? return end? what do they do?"
that's just short version of code
same as writing
if runTimer == nil then
return
end
'return' just exits the script/function so no further code is run this frame... i.e. because the timer doesn't exist yet we don't want to process the script.
Quote: "What does"%X" do?"
it's a special lua command that filters out a string to only use hexadecimal characters from it's string
there's some more alternatives
Quote: "%a letters
%c control characters
%d digits
%l lower case letters
%p punctuation characters
%s space characters
%u upper case letters
%w alphanumeric characters
%x hexadecimal digits
%z the character with representation 0"
i was confused it worked like that too but it seems the os.date() command is also a bit special and lets you search it by default, normally you will use something like
Prompt(string.gsub("hello, up-down!", "%A", "."))
which would produce
hello..up.down.
(basically swaps all non-letters with a period)
Quote: "Why is it parsing g_Time to a variable? Could you not just use g_Time as the variable anyway, or doesn't that work?"
yes you can but if you want to be fussy about speed or make sure the result is always the same you declare it as a local to make it easier for the script to access... think of it like looking at your watch every time g_Time is called compared to looking at it once and remembering the time.