Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 

WoWInterface » Developer Discussions » Lua/XML Help » save string to variable from slash command?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off