From c5bc00bc33de245fd895b9e7aa92cba9aed4d435 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Sat, 14 Apr 2007 18:33:00 +0000 Subject: [PATCH] * Added error checking to the macro type --- CliqueOptions.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CliqueOptions.lua b/CliqueOptions.lua index 1d94a1d..0319bd6 100644 --- a/CliqueOptions.lua +++ b/CliqueOptions.lua @@ -1204,6 +1204,9 @@ function Clique:ButtonOnClick(button) end local issue + local arg1 = entry.arg1 and tostring(entry.arg1) + local arg2 = entry.arg2 and tostring(entry.arg2) + if not entry.type then issue = "You must select an action type." elseif not entry.button then @@ -1216,8 +1219,12 @@ function Clique:ButtonOnClick(button) issue = "You must supply either a spell name and optionally an item slot/bag or name to consume when creating a \"spell\" action." elseif entry.type == "item" and not ((entry.arg1 and entry.arg2) or entry.arg3) then issue = "You must supply either a bag/slot, or an item name to use." - elseif entry.type == "menu" and not arg1 then + elseif entry.type == "menu" and not entry.arg1 then issue = "You must supply a menu function for action type \"menu\"." + elseif entry.type == "macro" and arg1 and arg2 then + issue = "You must specify EITHER a macro index, or macro text, not both." + elseif entry.type == "macro" and not arg1 and not arg2 then + issue = "You must supply either a macro index, or macro text" end if issue then -- 1.7.9.5