View Single Post
10/25/20, 10:19 AM   #5
mihannnik
Join Date: Oct 2020
Posts: 4
Originally Posted by Baertram View Post
Did you add the name of your SavedVariables to your txt file like I have described?
## SavedVariables: TTCPSavedVars
My TTCP.txt
Code:
## Title: TTCP
## APIVersion: 100032
## SavedVariables: TTCPSavedVars
TTCP.lua
Else the global table _G["TTCPSavedVars"] won't be created and nothing will be saved upon logout/reloadui/zone change loading screens.
I dont need to save anything, I only want to read file every time when player leave combat
And you should add an unregister to EVENT_ADD_ON_LOADED once your addon was loaded as after that the function shouldn't be called aymore.
Remeber: It will be called once for EACH addon/library!
Add in my addon in Initialize() function!

Or, maybe, i can read file using file : open(file)? In this way how to use absolute path in LUA?

Last edited by mihannnik : 10/25/20 at 10:21 AM. Reason: Question added
  Reply With Quote