I'm attempting to create an alias I can type that automatically creates a logfile and starts logging. (I want to be able to start logging when I start a RP without it logging everything.) Logging starts okay, the problem is just in the header (which I'm setting as the variable 'worldinfo')
Here's what that header comes out as:
TLK Nabana - x, I:45 PM
-----------------------
I know I could also use '%A, %B %d, %Y' in place of %#x, and that works alright, but to my knowledge there's not an alternative for %#I (the hour without the leading 0). Am I doing something wrong, or is there a problem somewhere? (I'm using v 4.05 of MUSHclient.)
<aliases>
<alias
match="start log"
enabled="y"
send_to="12"
sequence="100"
>
<send>local worldinfo = GetInfo(2).." - "..os.date('%#x, %#I:%M %p')
local linelength
OpenLog(GetInfo(58)..[[Nabana\]]..os.date("%Y")..[[\]]..os.date("%m %d".."-r.txt"),true)
WriteLog(worldinfo)
linelength = string.len(worldinfo)
WriteLog(string.rep("-",linelength))
WriteLog()</send>
</alias>
</aliases>Here's what that header comes out as:
TLK Nabana - x, I:45 PM
-----------------------
I know I could also use '%A, %B %d, %Y' in place of %#x, and that works alright, but to my knowledge there's not an alternative for %#I (the hour without the leading 0). Am I doing something wrong, or is there a problem somewhere? (I'm using v 4.05 of MUSHclient.)