The function for a slash command receives a single string parameter. If you want to interpret that into say commmands and parameters, you need to break down the string that is passed eg:
Lua Code:
SlashCmdList.SLASHFUNC = function(msg)
local command, p1, p2, p3, p4 = strsplit(" ", strupper(msg))
if command == "RESET" then
FCF_ResetChatWindows()
elseif command == "LEAVE" then
if p1 == "TRADE" then
LeaveChannelByName("Trade")
else
print(command, p1, "Not Implemented!")
end
end
end
-- test
SlashCmdList.SLASHFUNC = function("leave trade")
or are you saying you want to test if RunScript(strLine) is going to run without error before running RunScript(strLine)?