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!
The game doesn't allow direct filesystem access for obvious security reasons and also because ZOS doesn't want addons to communicate with external services in real time.
You are only able to use ZO_SavedVars to write to a predefined SV file in the Elder Scrolls Online/live/SsavedVariables folder.
This file will be written upon /reloadui, /logout ingame.
So again: There is no real-time update possible.
You are only able to use ZO_SavedVars to write to a predefined SV file in the Elder Scrolls Online/live/SsavedVariables folder.
This file will be written upon /reloadui, /logout ingame.
So again: There is no real-time update possible.
Not sure I understand your use-case, but wouldn't it be enough to check if eso64.exe is running? Most of the time that would be equal to being logged in, wouldn't it?