Originally Posted by fRodzet
Lua Code:
local linkType = strmatch(linkData, "|H(.-):")
doesn't seem to work.. and i don't quiet get, why it "should" work either?
string.split(":", linkData) makes also way more sense in my head :P
|
If your string looks like this:
"
|Hitem:12345:0:1:2:3|h[Random Item of the X]|h"
...then string.split on colons returns:
- "|Hitem"
- "12345"
- "0"
- "1"
- "2"
- "3|h[Random Item of the X]|h"
...whereas string.match to capture what's between the first "|H" and the first following ":" returns only "item":
|Hitem:12345:0:1:2:3|h[Random Item of the X]|h