Create a File at Login
Hey guys. I've never written an add-on before. I am trying to find out whether I can write a file out (externally) on character login. I tried to do something like this:
function MyAddon:Initialize()
file = nil
file = io.open("../test.txt", "w")
file:write("test me!")
file:close()
end
But I receive a nil error, so, apparently something about that is not correct. I code in Java for a living; don't really know anything about LUA. Any help would be appreciated!
|