Thread Tools Display Modes
Prev Previous Post   Next Post Next
10/21/18, 01:44 PM   #1
TheIvoryKitty
Join Date: Feb 2017
Posts: 6
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!
  Reply With Quote
 

ESOUI » AddOns » AddOn Search/Requests » Create a File at Login


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off