View Single Post
10-30-19, 12:38 PM   #1
daylighted
A Murloc Raider
Join Date: Oct 2019
Posts: 3
save string to variable from slash command?

currently my slash command looks like this, and what i want to happen is in comments/pseudocode


Code:
local function MyAddonCommands(msg, editbox)
    if msg == "test" then
        --str1 = everything written after "test" 
    end

SLASH_HELLOWORLD1, SLASH_HELLOWORLD2 = "/test1", "/test2"

SlashCmdList["HELLOWORLD"] = MyAddonCommands
so basically, if i type

/test1 test save this string

i want "save this string" to be saved to a variable

could someone help me out on how to do this?
  Reply With Quote