Fix for crash line 314 dying

His Dad [12-30-16 - 23:41]
Fix for crash line 314 dying
Filename
Doc/Changelog.txt
HistOffline.lua
history.lua
history.txt
diff --git a/Doc/Changelog.txt b/Doc/Changelog.txt
index 2f9e9d0..47d0eab 100644
--- a/Doc/Changelog.txt
+++ b/Doc/Changelog.txt
@@ -1,3 +1,7 @@
+2016-12-31 version 32
+	Fix to dying when just leaving non-vet, when the account has CP (error line 314)
+	(Non vet only goes to level 49, not 50)
+
 2016-12-07 version 31
 	Fixed Veteran Volenfell

diff --git a/HistOffline.lua b/HistOffline.lua
index 7972f40..62ebc8c 100644
--- a/HistOffline.lua
+++ b/HistOffline.lua
@@ -14,7 +14,7 @@ local Colour_Heading_Complete = "#58FA58"

 --iup.SetGlobal("UTF8MODE","YES")
 -- ========================
-version= "31"
+version= "32"
 require( "iuplua" )
 require( "iupluacontrols" )
 dofile "../../SavedVariables/History.lua"
diff --git a/history.lua b/history.lua
index 5eb1483..8c0c165 100644
--- a/history.lua
+++ b/history.lua
@@ -1,6 +1,6 @@
 hist = {
 	name = "history",
-	version = "31",
+	version = "32",
 	initialised = false,
 	SV={},
 	L={},
@@ -264,6 +264,7 @@ end

 local function CP_Achieved(_,_)
 	log("Achieved Champion Rank.")
+	log_me("Achieved Champion Rank.")
 end

 local function gendertext()
@@ -311,7 +312,7 @@ end
 local function Dead()
 	-- Per Level
 	if hist.me.levels[hist.me.level] ~= nil then
-		hist.me.levels[hist.me.base_level].deaths = hist.me.levels[hist.me.base_level].deaths +1	-- low level deaths
+		hist.me.levels[hist.me.level].deaths = hist.me.levels[hist.me.level].deaths +1	-- low level deaths -level 1 to 49, then jump tp CP
 	end
 	-- Per Map

diff --git a/history.txt b/history.txt
index 3fe758a..32b5527 100644
--- a/history.txt
+++ b/history.txt
@@ -1,6 +1,6 @@
 ## Title: Dad's History
 ## APIVersion: 100017
-## Version: 31
+## Version: 32
 ## Author: HisDad
 ## Description: Record progress of all characters for offline viewing.
 ## SavedVariables: History_SV