1
0
Bifurcation 0

attempt to index global 'ButtonForgeSave' (a nil value) #1

Fermé
créé 2019-09-20 00:03:37 +02:00 par Albirew · 3 commentaires
Propriétaire

some example when interacting buttonforge:

open BF: Message: Interface\AddOns\ButtonForge-classic\UILibLayers.lua:17: attempt to index global 'ButtonForgeSave' (a nil value)

close BF: Message: Interface\AddOns\ButtonForge-classic\UILibLayers.lua:33: attempt to index global 'ButtonForgeSave' (a nil value)

creating a bar: Message: Interface\AddOns\ButtonForge-classic\Util.lua:744: attempt to index global 'ButtonForgeSave' (a nil value)

etc.

some example when interacting buttonforge: open BF: Message: Interface\AddOns\ButtonForge-classic\UILibLayers.lua:17: attempt to index global 'ButtonForgeSave' (a nil value) close BF: Message: Interface\AddOns\ButtonForge-classic\UILibLayers.lua:33: attempt to index global 'ButtonForgeSave' (a nil value) creating a bar: Message: Interface\AddOns\ButtonForge-classic\Util.lua:744: attempt to index global 'ButtonForgeSave' (a nil value) etc.
Auteur
Propriétaire

trying to copy account/character saved variable from retail account results in content being overwitten by nil values:

global:
ButtonForgeGlobalSettings = nil
ButtonForgeGlobalProfiles = nil
ButtonForgeGlobalBackup = nil
character:
ButtonForgeSave = nil
BFSave = nil

trying to copy account/character saved variable from retail account results in content being overwitten by nil values: global: ButtonForgeGlobalSettings = nil ButtonForgeGlobalProfiles = nil ButtonForgeGlobalBackup = nil character: ButtonForgeSave = nil BFSave = nil
Auteur
Propriétaire

PM from xfsbill at Curse:

Alright. I've managed to successfully installed the classic addon. After debugging for a while, I realized that some SavedVariables are saved in the character WTF folder. Digging out more, I found that in Classic you seems to absolutely need to declares your variables (specially the tables). If not, when trying to assign values, it will fail.

If you add the following at the end of Declares.lua, you will get a bit further:

BFSave = {};
ButtonForgeSave = {};

In Bar.lua line 326, you need to change

local NumSpecs = GetNumSpecializations()

to

local NumSpecs = 1;

It doesn't seem to exist in Classic.

Another thing if you want to speed your testing, create 2 macros:

1- Show/Hide Lua Errors

/run if GetCVar("ScriptErrors")=="1" then SetCVar("ScriptErrors","0");print("Show LUA Errors: Off");else SetCVar("ScriptErrors","1");print("Show LUA Errors: On");end

2- Toggle ButtonForge

/click BFToolbarToggle

This last macro will avoid having to go under the Addons menu every time you want to pop the toolbar. You won't it anymore once you got a working BF bar.

Hope that helps. There's still a lot to fix to make this usable but it should get you started.

## PM from xfsbill at Curse: Alright. I've managed to successfully installed the classic addon. After debugging for a while, I realized that some SavedVariables are saved in the character WTF folder. Digging out more, I found that in Classic you seems to absolutely need to declares your variables (specially the tables). If not, when trying to assign values, it will fail. If you add the following at the end of Declares.lua, you will get a bit further: BFSave = {}; ButtonForgeSave = {}; In Bar.lua line 326, you need to change local NumSpecs = GetNumSpecializations() to local NumSpecs = 1; It doesn't seem to exist in Classic. Another thing if you want to speed your testing, create 2 macros: 1- Show/Hide Lua Errors /run if GetCVar("ScriptErrors")=="1" then SetCVar("ScriptErrors","0");print("Show LUA Errors: Off");else SetCVar("ScriptErrors","1");print("Show LUA Errors: On");end 2- Toggle ButtonForge /click BFToolbarToggle This last macro will avoid having to go under the Addons menu every time you want to pop the toolbar. You won't it anymore once you got a working BF bar. Hope that helps. There's still a lot to fix to make this usable but it should get you started.
Albirew a fermé ce ticket 2019-10-12 22:34:20 +02:00.
Albirew a réouvert ce ticket 2019-10-15 15:56:24 +02:00.
Albirew a créé une dépendance 2019-10-15 15:56:36 +02:00.
Albirew a fermé ce ticket 2019-10-15 15:56:46 +02:00.
Auteur
Propriétaire

also related to 3313d1df69

also related to 3313d1df69862926a5fe58318e90150a19647567
Ce dépôt est archivé. Vous ne pouvez pas commenter de tickets.
Sans jalon
Sans projet
Sans assignation
1 participant
Échéance
La date d’échéance est invalide ou hors plage. Veuillez utiliser le format "aaaa-mm-dd".

Aucune échéance n'a été définie.

Bloque
#4 Addon is not working in classic WoW}
Albirew/ButtonForge-classic
Référence : Albirew/ButtonForge-classic#1
Sans contenu.