I have this in my toc file:
Code:
function Frame1_OnLoad()
this:RegisterEvent("PLAYER_TARGET_CHANGED");
this:RegisterEvent("SKILL_LINES_CHANGED");
local skillRanktest = "test";
end
function Frame1_OnEvent(event)
if event == "PLAYER_TARGET_CHANGED" then
for skillIndex = 1, GetNumSkillLines() do
skillName, isHeader, isExpanded, skillRank, numTempPoints, skillModifier,
skillMaxRank, isAbandonable, stepCost, rankCost, minLevel, skillCostType,
skillDescription = GetSkillLineInfo(skillIndex)
if isHeader == nil then
if skillName == "Skinning" then
FontString1:SetText("Your skinning level is: " .. skillRank .. "!");
FontString2:SetText("You can skinn level " .. math.floor(skillRank/5) .. " mobs");
end
end
end
end
if event == "SKILL_LINES_CHANGED" then
for skillIndex = 1, GetNumSkillLines() do
skillName, isHeader, isExpanded, skillRank, numTempPoints, skillModifier,
skillMaxRank, isAbandonable, stepCost, rankCost, minLevel, skillCostType,
skillDescription = GetSkillLineInfo(skillIndex)
if isHeader == nil then
if skillName == "Skinning" then
FontString1:SetText("Your skinning level is: " .. skillRank .. "!");
FontString2:SetText("You can skinn level " .. math.floor(skillRank/5) .. " mobs");
end
end
end
end
end
But when i try to save " skillRank " I get 300, but it should be 256.
Where is this problem?