diff --git a/AscensionExporter/Core.lua b/AscensionExporter/Core.lua
index b867708..f116457 100644
--- a/AscensionExporter/Core.lua
+++ b/AscensionExporter/Core.lua
@@ -355,7 +355,23 @@ function AE:GenerateMarkdownTalents()
-- Convert to calculator format using the mapper
local _, class = UnitClass("player")
- local buildString = self.ConvertAscensionTalentsToCalcFormat and self.ConvertAscensionTalentsToCalcFormat(ascensionIds, class)
+
+ -- Debug output
+ table.insert(lines, string.format("*Debug: Class=%s, TalentIDs=%d*\n", tostring(class), #ascensionIds))
+ table.insert(lines, string.format("*Debug: Mapper loaded=%s, Function type=%s*\n",
+ tostring(self._loadedAscensionTalentMapper or false),
+ tostring(type(self.ConvertAscensionTalentsToCalcFormat))))
+
+ if not self.ConvertAscensionTalentsToCalcFormat then
+ table.insert(lines, "*Error: ConvertAscensionTalentsToCalcFormat function not available.*\n")
+ return table.concat(lines, "\n")
+ end
+
+ local buildString, err = self.ConvertAscensionTalentsToCalcFormat(ascensionIds, class)
+
+ if err then
+ table.insert(lines, string.format("*Conversion error: %s*\n", tostring(err)))
+ end
if buildString then
-- Generate URL for talent calculator
@@ -363,11 +379,11 @@ function AE:GenerateMarkdownTalents()
table.insert(lines, string.format("[View in Talent Calculator](%s)\n", url))
-- Embed iframe for Wiki.js
- table.insert(lines, string.format('\n", buildString))
+ table.insert(lines, string.format('\n', buildString))
return table.concat(lines, "\n")
else
- table.insert(lines, "*Could not convert talents to calculator format. Only mage class is currently supported.*\n")
+ table.insert(lines, "*Could not convert talents to calculator format (no build string returned).*\n")
return table.concat(lines, "\n")
end
end