Minor cleanup

His Dad [04-20-15 - 04:57]
Minor cleanup
Filename
history.lua
diff --git a/history.lua b/history.lua
index 20542e5..0334e17 100644
--- a/history.lua
+++ b/history.lua
@@ -13,7 +13,7 @@ hist = {

 local function log_truncate(max)
 --Limit log to max
-	for i = max, #hist.SV.log  do
+	for _ = max, #hist.SV.log  do
 		table.remove(hist.SV.log)
 		d("Truncated log.  Size now" .. tostring(hist.SV.log))
 	end
@@ -29,7 +29,7 @@ local function Achievement(_, name, points, id, link)
 	local description
 	local category_id  = GetCategoryInfoFromAchievementId(id)
 	local category_name =GetAchievementCategoryInfo(category_id)
-		_,description,_,_,_,_,_= GetAchievementInfo(i)
+		_,description,_,_,_,_,_= GetAchievementInfo(id)
 	hist.me.ach[id]={
 		["Category_ID"] = category_id,
 		["Category"] = category_name,
@@ -54,6 +54,7 @@ function load_history()
 -- load up historic Achievements for Category 7  (Dungeons)
 	log("Request to load historic Dungeon Achievements")
 	local name,points,description,completed,adate,atime
+  local cat
 	for i = 1,1400 do
 		name,description,points,_,completed,adate,atime= GetAchievementInfo(i)
 		if completed then
@@ -61,7 +62,7 @@ function load_history()
 			if cat == 7 then
 				if hist.me.ach[i] == nil then
 					log("Added historic achievement " ..i .. " " .. name)
-						local category_id  = GetCategoryInfoFromAchievementId(id)
+						local category_id  = GetCategoryInfoFromAchievementId(i)
 						local category_name =GetAchievementCategoryInfo(category_id)
 						hist.me.ach[i]={
 							["Category_ID"] = category_id,