View Single Post
06/01/20, 04:24 PM   #3
Unleash101
Join Date: Jun 2020
Posts: 6
Originally Posted by Baertram View Post
Cannot see any reason from the code except that myAddon is not "unique" and every other of your active addons could define such a variable
Better choose something unique like "MyAddonForTest1" or similar or make sure all other addons are disabled as you test.

What line is the error message telling you the error is? Please copy&paste post the complete error message from the error popup.
You should also "expand" the error message so you can see the stack traceback (what way the loading of the functions took) and the variables and their contents. There you are able to see on first sight if any variable, and which one, does not have the value you did expect it has.

Also make sure the folder name and the manifest txt file name of your addon are exactly the same!


Oh and whereever you have taken the example from please do not use ZO_SavedVars:New for character SavedVariables anymore as these will use the charactername and are not rename safe.
Better use ZO_SavedVars:NewCharacterIdSettings instead now.
Lua Code:
  1. function myAddon.Activated(e)
  2.     EVENT_MANAGER:UnregisterForEvent(myAddon.name, EVENT_PLAYER_ACTIVATED)
  3.     --d(GetString(SI_DEBUG_MESSAGE))\
  4.     d(myAddon.name)
  5.    
  6. end

This function sends nil to the chat, although it should send myAddon

I checked the name of the myAddon folder
Moreover, I disabled all add-ons during the test.

Thanks for the advice. I will use ZO_SavedVars: NewCharacterIdSettings
  Reply With Quote