Fix error on ln 299

Talen-Shei [08-09-15 - 22:42]
Fix error on ln 299
Filename
KeyBindSwapper.lua
diff --git a/KeyBindSwapper.lua b/KeyBindSwapper.lua
index 0be5d71..6e38028 100644
--- a/KeyBindSwapper.lua
+++ b/KeyBindSwapper.lua
@@ -239,6 +239,14 @@ function createNewProfile(name)
 	end
 end

+function getProfile()
+	if KBS.Account.SingleTarget == true then
+		return KBS.Account.BindingTarget
+	else
+		return KBS.Character.BindingTarget
+	end
+end
+

 ---------------------LAM 2.0 SETTINGS--------------------------

@@ -296,8 +304,8 @@ local function CreateSettingsMenu()
 			sort = "name-up",
 			reference = "KBSProfiles",
 			default = "Main",
-			getFunc = function() if KBS.Account.SingleTarget == true then return KBS.Account.BindingTarget else return KBS.Character.BindingTarget end,
-			setFunc = function(bValue) if KBS.Account.SingleTarget == true then KBS.Account.BindingTarget = bValue else KBS.Character.BindingTarget = bValue end,
+			getFunc = GetProfile(),
+			setFunc = GetProfile(),
 			 -- KBS.Character.BindingTarget = bValue end,
 		},
 		[5] = {