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! |
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. Check the esoui wiki for SavedVariables: https://wiki.esoui.com/Circonians_Sa...ables_Tutorial Or the forums, e.g. this thread: https://www.esoui.com/forums/showthr...t=ZO_SavedVars |
Quote:
|
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? :D
|
All times are GMT -6. The time now is 02:50 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI