Thread Tools Display Modes
12-25-14, 09:22 AM   #1
Uitat
A Chromatic Dragonspawn
 
Uitat's Avatar
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 162
I think i need help here (old dr.damage)

so i am getting the error GetNumTalents = nil

i understand that his has been removed from the API but i can not figure out how to bypass it/fix it

it seems to be happening here in this code

actualll line of code in the real Program is 2207 -2237
the error fires off at line 2209 and states GetNumTalents = nil
in this bit of code it would be line 3

Lua Code:
  1. local talentTable = optionsTable.Talents.args
  2.     for t = 1, GetNumSpecializations() do
  3.         for i = 1, GetNumTalents(t) do --
  4.             local talentName, icon, _, _, _, maxRank = GetTalentInfo(t, i)
  5.             if talentInfo[talentName] and not talentInfo[talentName].NoManual then
  6.                 talentTable[(string_gsub(talentName," +", ""))] = {
  7.                     type = 'range',
  8.                     name = "|T" .. icon .. ":20:20:-5:0|t" .. talentName,
  9.                     --disabled = function() return self.CustomTalents end,
  10.                     min = 0,
  11.                     max = maxRank,
  12.                     step = 1,
  13.                     order = 3 + i + (t-1) * 50,
  14.                     get =   function() return talents[talentName] or 0 end,
  15.                     set =   function(info, v)
  16.                                 if v == 0 and not talentInfo[talentName].Manual then
  17.                                     talents[talentName] = nil
  18.                                 else
  19.                                     talents[talentName] = v
  20.                                 end
  21.                                 self:UpdateTalents(true)
  22.                             end,
  23.                 }
  24.             end
  25.         end
  26.         talentTable[("Tab" .. t)] = {
  27.             type = 'header',
  28.             name = --[["|T" .. select(2,GetSpecializationInfo(t)) .. ":30:30:-7:0|t" ..--]] select(2,GetSpecializationInfo(t)),
  29.             order = 2 + (t-1) * 49,
  30.         }
  31.     end
__________________
  Reply With Quote
12-25-14, 03:17 PM   #2
sirann
A Flamescale Wyrmkin
Join Date: Mar 2007
Posts: 142
http://wowprogramming.com/docs/api/GetNumTalents

It's no longer a thing. So it doesn't know what to do with getnumtalents. I'd figure out the api you need, but I'm on my phone and I hate searching for stuff when it's so easy comparatively on a computer.

E: could try looking at this: http://wowprogramming.com/docs/api/GetTalentInfo

Last edited by sirann : 12-25-14 at 03:19 PM.
  Reply With Quote
12-25-14, 04:11 PM   #3
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,934
Don't forget to check wowpedia.org too. It looks like that site is more updated with the 6.0 functions for this area.

Talent Functions
  • CheckTalentMasterDist() - Returns nil if the player is too far away from the talent master to use the talent methods.
  • ConfirmTalentWipe() - Confirms freeing all talent points.
  • GetMaxTalentTier() - Returns the number of available talent tiers.
  • GetNumTalents([inspect]) - Returns the maximum talent slot index.
  • GetNumUnspentTalents() - Returns the number of unspent talents.
  • GetTalentClearInfo() - Returns information about the current cost of unlearning a talent
  • GetTalentInfo(talentID[,isInspect[,specGroup[,inspectID[, classID]]]])- Returns information about a talent.
  • GetTalentLink(talentID[,isInspect[,specGroup[,inspectID[, classID]]]]) - Returns the talent link.
  • GetTalentRowSelectionInfo(tier) - Returns information about the player's talent selection in the specified talent tier.
  • IsTalentSpell(slot, bookType) - Returns whether or not the specified spell is learned from a talent.
  • REMOVED LearnTalent(tabIndex,talentIndex) - Learns a talent from the talent tree. Renamed to LearnTalents (5.0.4)
  • NOCOMBAT LearnTalents(talentID1, talentID2, etc..) - Learns the talents listed.
  • PickupTalent(talentID) - Grabs the selected talent spell for placement on an action bar.
  • NOCOMBAT RemoveTalent(talentID) - Removes the specified talent.

Specialization Functions
  • GetActiveSpecGroup([isInspect]) - Returns the index of the current active specialization/talent/glyph group.
  • GetArenaOpponentSpec() -
  • GetInspectSpecialization("unit") - Returns a number representing the current active specialization of a given unit.
  • GetNumArenaOpponentSpecs() -
  • GetNumSpecGroups([isInspect]) - Returns the number of specialization group (dual specs) the player has.
  • GetNumSpecializations([isInspect[, isPet]]) - Returns the number of available specializations.
  • GetNumSpecializationsForClassID(classID) - Returns the number of specializations available to a particular class.
  • GetSpecialization([isInspect[, isPet[, specGroup]]]) - Returns the index of the player's current specialization.
  • GetSpecializationInfo(specIndex[, isInspect[, isPet]]) - Returns information about the player's specializations.
  • GetSpecializationInfoByID(specID) - Returns information about the specified specialization.
  • GetSpecializationInfoForClassID(classID, specIndex) - Returns information about the specified specialization.
  • GetSpecializationMasterySpells(specIndex[, isInspect[, isPet]]) - Returns the mastery spellID of the current player's specialization.
  • GetSpecializationRole(specIndex[, isInspect[, isPet]]) - Returns the role a specialization is intended to perform.
  • GetSpecializationRoleByID(specID) - Returns the role a specialization is intended to perform.
  • GetSpecializationSpells(specIndex[, isInspect[, isPet]]) - Returns the spellID of key abilities used by the specified specialization.
  • GetSpecsForSpell("spellName" or spellIndex, "bookType") - Returns the specs for which the specified spell can be used.
  • IsSpellClassOrSpec("spellName" or spellIndex, "bookType") - Returns whether a given spell is specific to a specialization and/or class.
  • NOCOMBAT SetActiveSpecGroup(groupIndex) - Changes the active specialization group.
  • NOCOMBAT SetSpecialization(specIndex [, isPet]) - Selects a specialization.
  • NOCOMBAT UnlearnSpecialization(specIndex [, isPet]) -
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
12-26-14, 11:28 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Why exactly are you trying to update Dr. Damage? There's absolutely no need for such an addon anymore, since your spell tooltips now display the actual amount of damage each spell will do with your current stats. Dr. Damage exists because that used to not be the case -- the tooltip only showed the base amount, and the addon had to do a lot of work to estimate the actual amount based on your gear, talents, etc. Doing all that work yourself at this point would just be pointless redundancy.

If all you want to do is show the damage numbers on your action bars, there's a much easier way to do that -- just pull the number out of the tooltip and show it. No talent checking or other theorycrafting required.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
12-27-14, 07:18 AM   #5
Uitat
A Chromatic Dragonspawn
 
Uitat's Avatar
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 162
Originally Posted by Phanx View Post
Why exactly are you trying to update Dr. Damage? There's absolutely no need for such an addon anymore, since your spell tooltips now display the actual amount of damage each spell will do with your current stats. Dr. Damage exists because that used to not be the case -- the tooltip only showed the base amount, and the addon had to do a lot of work to estimate the actual amount based on your gear, talents, etc. Doing all that work yourself at this point would just be pointless redundancy.

If all you want to do is show the damage numbers on your action bars, there's a much easier way to do that -- just pull the number out of the tooltip and show it. No talent checking or other theorycrafting required.
thank you i never though of that Phanx, once again your the bomb. seems i never like to see the easy way
__________________
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » I think i need help here (old dr.damage)


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