View Single Post
08-06-18, 06:39 PM   #8
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
You were likely linking an item that had a space in it, when testing with Kanegasi's code.

strsplit accepts an optional 3rd argument that defines how many pieces to make.
https://wow.gamepedia.com/API_strsplit

You can still use Kanegasi's simpler method like this.
Lua Code:
  1. local command, link = strsplit(" ", input, 2)
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote