04-06-2013, 10:39 PM
IDK, simplest way is to do what I do, use my split function:
Call it with:
The code is free to use for whatever you like.
Code:
function split(string, pattern)
-- Define variables.
local t = {} -- NOTE: use {n = 0} in Lua-5.0
local fpat = "(.-)" .. pattern
local last_end = 1
local s, e, cap = string:find(fpat, 1)
-- Split the string.
while s do
if s ~= 1 or cap ~= "" then
table.insert(t,cap)
end
last_end = e+1
s, e, cap = string:find(fpat, last_end)
end
if last_end <= #string then
cap = string:sub(last_end)
table.insert(t, cap)
end
-- Return the table.
return t
end
Call it with:
Code:
Player = split(Block:GetValue(KeyName, "I"), ",")
The code is free to use for whatever you like.