ES Recruitment Drive
Originally Posted by psycore View Post
With a slash? Strange. Adre you sure it's not a backslash (\)?


oh woops my bad yeah it's a backslash ;o
-----



here is an image. i highlighted the folder and the file that the script created
Last edited by DropKick; Jul 19, 2011 at 11:48 PM. Reason: <24 hour edit/bump
A dueler is only a good as his finest lift.

I love many people on this forum such as ...
Uric|Internet|Stellar|Wesley|Boonana|AJ|FireBolty|iRookie|Brucia|Kristis133|Liquidoom|Lightningkid
[type=noob]monk[noob]
I respect...
ಠ_ಠ
Maybe it doesn't work with mac.
Try opening my script (with some text editor) and change "\chats\\" to "/chat/"
Signature temporarily out of order.
k ill try and see what happens posting results soon.


done ill see what happens now


nope, it still is being saving in the document file.

also... at the top of the script chat is miss-spelled is that suppose to be that way? add_hook("console", "cahtlog", function(message, n)
Last edited by DropKick; Jul 19, 2011 at 11:56 PM.
A dueler is only a good as his finest lift.

I love many people on this forum such as ...
Uric|Internet|Stellar|Wesley|Boonana|AJ|FireBolty|iRookie|Brucia|Kristis133|Liquidoom|Lightningkid
[type=noob]monk[noob]
I respect...
well, you could change that but that doesn't matter.

My last guess is change "/chats/" to "chats/" but that's really a guess.
Signature temporarily out of order.
ok ok well if this don't work thanks for the script because it's cool anyways. (when i add the chat document into the folder all the data on it is erased .-.)
A dueler is only a good as his finest lift.

I love many people on this forum such as ...
Uric|Internet|Stellar|Wesley|Boonana|AJ|FireBolty|iRookie|Brucia|Kristis133|Liquidoom|Lightningkid
[type=noob]monk[noob]
I respect...
o_O
that really shouldn't happen. try closing tb before moving the files. If that works then lua doesn't work properly on mac.
Signature temporarily out of order.
WAIT i think i relized what ive been doing wrong.


i've been using runscript.lua so it has been using the first chatlog.lua you gave me, hopefully if i change that it'll work



EDIT: YES!!! it works now, it was because i was using the first one you gave me the whole time x_x. but now it works
Last edited by DropKick; Jul 20, 2011 at 12:22 AM.
A dueler is only a good as his finest lift.

I love many people on this forum such as ...
Uric|Internet|Stellar|Wesley|Boonana|AJ|FireBolty|iRookie|Brucia|Kristis133|Liquidoom|Lightningkid
[type=noob]monk[noob]
I respect...
Originally Posted by psycore View Post
@Pedant: What takes you that long?

I was done about 5 minutes after I posted, but was kicked off of the internet.
My version (cba uploading the file):

Lua code:
--[[
* @title Logger
* @author Pedant
* @desc Imaginative title says all. Saves logs of
* everything that uses SAY (basically anything in that
* little chatbox that you echo() into).
* @note Gotta love these docblocky comments. :D
]]--

local filename = os.date():sub(0, 8):gsub('/', '-')
local file = io.open('logs/' .. filename .. '.txt', 'a+', true)
file:write('Logging started:' .. os.date():sub(9) .. '\n')

local function autostart()
local asFile = io.open('profile.tbs', 'a+', true)
if (not asFile:read('*a'):find('logger.lua')) then
asFile:write('loadscript logger.lua\n')
end
asFile:close()
end

add_hook('console', 'logger_console_hook', function(s, i)
file:write(s .. '\n')
end)

add_hook('unload', 'logger_unload_hook', function()
file:write('Logging closed:' .. os.date():sub(9) .. '\n\n')
file:close()
end)

autostart()
Ah, I knew there was a built in way to run scripts. Nice one.
Signature temporarily out of order.