View Single Post
02-25-15, 10:52 AM   #4
Elkano
A Flamescale Wyrmkin
 
Elkano's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2005
Posts: 131
Never did much work with GUIDs myself, so I don't know which is used for what, sorry.

But regarding getting the first part of the string, your syntax for :sub is wrong (e.g. starts at 5th char and includes the dash).

You could try one of the following:
Code:
bb = strsplit("-", casterGUID) -- split string on dashes, assign the first resulting string to BB, discard rest
bb = strmatch(casterGUID, "^([^-]+)") -- get the longest sequence of non-dash characters starting at the beginning of the string
__________________
This posting is made of 100% recycled electrons.
  Reply With Quote