PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: Corayzon on 07 May, 2004, 07:40:55

Title: appendto() problems
Post by: Corayzon on 07 May, 2004, 07:40:55
hey guys...just havin a little problem with the appendto and writeto functions

function logToFile(sLogType, tArgs)
if tLog[sLogType] ~= nil then
appendto(loggingpath .. loggingfile[tLog[sLogType]["File"]])
if sLogType == "connections" then
write(translateString(tLog[sLogType]["Format"], tArgs) .. "\r\n")
return nil
end
writeto()
end
end

the file here doesnt update until the function is called again or the hub scripts restart...

first i thought you would just close with appendto() but it expects a filename, and writeto just doesnt seem to close it

whats the problem?

thankz in advnce =]
Title:
Post by: Corayzon on 07 May, 2004, 07:46:03
my silly mistake...its i return after the write() and writeto() doesnt get a change to execute