Quantcast
Channel: OTLand
Viewing all articles
Browse latest Browse all 32031

File logging

$
0
0
Can someone tell me why this doesn't work?

Game Core
Lua:
function Game.logInformation(fileDir, text)
    print("Logging -> "..fileDir..": "..text)
    
    local file = io.open (fileDir, "a+")
    
    if not file then print("Could not load file "..fileDir..". Failed to log.") return false end
    
    file:seek("end")
    file:write(text)
return true
end
Talkaction
Lua:
function onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return...
File logging

Viewing all articles
Browse latest Browse all 32031

Trending Articles