Quantcast
Problem Loading a profile - WoWInterface
Thread Tools Display Modes
04-28-15, 11:00 AM   #1
Uitat
A Flamescale Wyrmkin
 
Uitat's Avatar
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 141
Problem Loading a profile

ok before patch 6.1 the code ran just fine, accessing the DB for SLDT perfectly. but now i get this error

1x UItat\Core.lua:191: attempt to call method 'CopyProfile' (a nil value)
UItat\Core.lua:191: in function `Generic_Setup'
UItat\Core.lua:76: in function `HUNTER_OnClick'
[string "*:OnClick"]:1: in function <[string "*:OnClick"]:1>

now i wiped out all my gibberish information so the error now is at line 55 in this code instead of 191

the saved variable for SLDT is
SLDataText and the DB inserted into it is SLDTDB

could use some help here.
thank you in advance for your info and helps

here is my code

Lua Code:
  1. function Generic_Setup()
  2.     SetCVar("useuiScale", 1);
  3.     SetCVar("uiScale", 0.64);
  4.     SetCVar("enableCombatText", 0);
  5.     SetCVar("CombatDamage", 0);
  6.     SetCVar("CombatHealing", 0);
  7.     SetCVar("fctSpellMechanics", 0);
  8.     SetCVar("displaySpellActivationOverlays", 0);
  9.     SetCVar("consolidateBuffs", 0);
  10.     if IsAddOnLoaded("Broker2FuBar") then
  11.         Broker2FuBar = LibStub("AceAddon-3.0"):GetAddon("Broker2FuBar",true);
  12.         Broker2FuBar.db:CopyProfile("UItat - Server");
  13.     end
  14.     if IsAddOnLoaded("Outfitter") then
  15.         Outfitter.Settings.Options.HideMinimapButton = 1;
  16.         Outfitter.Settings.Options.DisableItemComparisons = 1;
  17.     end
  18.     if IsAddOnLoaded("AtlasLoot") then
  19. --      AtlasLootLoader.db.MiniMapButton.hide = true;
  20.     end
  21.     if IsAddOnLoaded("Castbars") then
  22.         Castbars = LibStub("AceAddon-3.0"):GetAddon("Castbars",true);
  23.         Castbars.db:CopyProfile("Default");
  24.     end
  25.     if IsAddOnLoaded("Proximo") then
  26.         Proximo.db:CopyProfile("UItat");
  27.     end
  28.     if IsAddOnLoaded("Broker_Auditor") then
  29.         AuditorBroker.db.profile.hideTotalInBar = true;
  30.         AuditorBroker.db.global.LibDBIcon.hide = true;
  31.     end
  32.     if IsAddOnLoaded("Auditor2") then
  33.         Auditor.db.profile.autoRepair = true;
  34.         Auditor.db.realm.sellGreys = true;
  35.     end
  36.     if IsAddOnLoaded("InlineAura") then
  37.         InlineAura = LibStub("AceAddon-3.0"):GetAddon("InlineAura",true);
  38.         InlineAura.db.profile.hideCountdown = true;
  39.     end
  40.     if IsAddOnLoaded("Recount") then
  41.         Recount.db:CopyProfile("UItat");
  42.         Recount.MainWindow:Hide();
  43.     end
  44.     if IsAddOnLoaded("Raven") then
  45.         Raven.db:SetProfile("Default");
  46.     end
  47.     if IsAddOnLoaded("Dominos") then
  48.         Dominos:CopyProfile("UItat");
  49.     end
  50.     if IsAddOnLoaded("Omen") then
  51.         Omen.db:CopyProfile("UItat - Server");
  52.     end
  53.     if IsAddOnLoaded("SLDataText") then
  54.         SLDataText = LibStub("AceAddon-3.0"):GetAddon("SLDataText",true);
  55.         SLDTDB:CopyProfile("Uitat - Server");
  56.     end
  57. end
__________________
  Reply With Quote
04-28-15, 11:14 AM   #2
Banknorris
A Chromatic Dragonspawn
 
Banknorris's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 153
Err, are you sure SLDTDB:CopyProfile exists? put a print(SLDTDB:CopyProfile) after line 54. If it prints nil the function does not exist (yet) when it is called.
__________________
"In this world nothing can be said to be certain, except that fractional reserve banking is a Ponzi scheme and that you won't believe it." - Mandrill
  Reply With Quote
04-28-15, 11:36 AM   #3
Uitat
A Flamescale Wyrmkin
 
Uitat's Avatar
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 141
Originally Posted by Banknorris View Post
Err, are you sure SLDTDB:CopyProfile exists? put a print(SLDTDB:CopyProfile) after line 54. If it prints nil the function does not exist (yet) when it is called.
ok i did that and i just get another Error

2x [string "print(SLDTDB:CopyProfile)"]:1: function arguments expected near ')'
[C]: in function `RunScript'
FrameXML\ChatFrame.lua:2091: in function `?'
FrameXML\ChatFrame.lua:4422: in function `ChatEdit_ParseText'
FrameXML\ChatFrame.lua:4076: in function `ChatEdit_SendText'
FrameXML\ChatFrame.lua:4115: in function `ChatEdit_OnEnterPressed'
[string "*:OnEnterPressed"]:1: in function <[string "*:OnEnterPressed"]:1>

Locals:
msg = "print(SLDTDB:CopyProfile)"
__________________
  Reply With Quote
04-28-15, 11:42 AM   #4
Uitat
A Flamescale Wyrmkin
 
Uitat's Avatar
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 141
now technically it should exist, as you see up there CopyProfile is used multiple times before i call on the SLDTDB
__________________
  Reply With Quote
04-28-15, 12:02 PM   #5
Banknorris
A Chromatic Dragonspawn
 
Banknorris's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 153
Oops sorry I meant to say
Code:
print(SLDTDB.CopyProfile) --dot, not colon
Originally Posted by Uitat View Post
now technically it should exist, as you see up there CopyProfile is used multiple times before i call on the SLDTDB
I am probably not qualified to answer/help then because in my head each CopyProfile is a different function (each function is an element of a different object, they just have the same name). Same as in Banknorris.bank_account.money < Uitat.bank_account.money. Both money are money but my money is not your money.
__________________
"In this world nothing can be said to be certain, except that fractional reserve banking is a Ponzi scheme and that you won't believe it." - Mandrill

Last edited by Banknorris : 04-28-15 at 12:18 PM.
  Reply With Quote
04-28-15, 12:18 PM   #6
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,231
I think you're looking for

Code:
SLDataText.db:CopyProfile()
Edit:
You shouldn't need

Code:
SLDataText = LibStub("AceAddon-3.0"):GetAddon("SLDataText",true);
as it's already instantiated in SLDT as a frame.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 04-28-15 at 12:21 PM.
  Reply With Quote
04-28-15, 02:11 PM   #7
Uitat
A Flamescale Wyrmkin
 
Uitat's Avatar
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 141
ok issue solved, i commented out a little and voila'

Lua Code:
  1. if IsAddOnLoaded("SLDataText") then
  2. --  SLDataText = LibStub("AceAddon-3.0"):GetAddon("SLDataText",true);
  3.  
  4.     SLDataText.db:CopyProfile("Uitat - Server");
  5. end

oh and i edited the DB when i was done to solidify my Settings as to easily pick them out from testing toons and named it to Uitat - Server
__________________
  Reply With Quote
04-29-15, 02:05 AM   #8
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,111
I'm curious why you are loading Broker2Fubar when Fubar doesn't exist anymore? It has been dead for years.
  Reply With Quote
04-29-15, 10:30 AM   #9
Uitat
A Flamescale Wyrmkin
 
Uitat's Avatar
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 141
Originally Posted by myrroddin View Post
I'm curious why you are loading Broker2Fubar when Fubar doesn't exist anymore? It has been dead for years.
i use a fubar dummy to use

Battleground fu

but i should rewrite that part of the code to be more up to date and remove whitespace on things that arent used anymore
__________________
  Reply With Quote
04-29-15, 11:03 AM   #10
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Originally Posted by Uitat View Post
i use a fubar dummy to use

Battleground fu

but i should rewrite that part of the code to be more up to date and remove whitespace on things that arent used anymore
How is that even still working, with all of the changes to battlegrounds and other assorted related systems since the AddOn was last updated... in 2008?
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
04-29-15, 11:41 AM   #11
Uitat
A Flamescale Wyrmkin
 
Uitat's Avatar
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 141
Originally Posted by Torhal View Post
How is that even still working, with all of the changes to battlegrounds and other assorted related systems since the AddOn was last updated... in 2008?
i have no clue but wow is not throwing any errors on it. technically it shouldnt lol
__________________
  Reply With Quote
04-29-15, 11:45 AM   #12
Uitat
A Flamescale Wyrmkin
 
Uitat's Avatar
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 141
if anyone experienced in breaking add ons in play wants to test this newest edition of uitat i would be grateful for your time
__________________
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Problem Loading a profile

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off