cIniFile help?
#9
IDK, simplest way is to do what I do, use my split function:

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.
Reply
Thanks given by:


Messages In This Thread
cIniFile help? - by bearbin - 04-05-2013, 06:01 PM
RE: cIniFile help? - by NiLSPACE - 04-05-2013, 06:06 PM
RE: cIniFile help? - by bearbin - 04-05-2013, 06:08 PM
RE: cIniFile help? - by xoft - 04-05-2013, 10:09 PM
RE: cIniFile help? - by bearbin - 04-06-2013, 04:15 AM
RE: cIniFile help? - by xoft - 04-06-2013, 05:11 AM
RE: cIniFile help? - by bearbin - 04-06-2013, 05:32 AM
RE: cIniFile help? - by NiLSPACE - 04-06-2013, 09:06 PM
RE: cIniFile help? - by bearbin - 04-06-2013, 10:39 PM
RE: cIniFile help? - by NiLSPACE - 04-06-2013, 11:01 PM
RE: cIniFile help? - by bearbin - 04-06-2013, 11:03 PM
RE: cIniFile help? - by xoft - 04-07-2013, 01:48 AM
RE: cIniFile help? - by bearbin - 04-07-2013, 02:07 AM
RE: cIniFile help? - by xoft - 04-07-2013, 02:17 AM
RE: cIniFile help? - by FakeTruth - 04-07-2013, 03:39 AM
RE: cIniFile help? - by bearbin - 04-07-2013, 03:19 AM



Users browsing this thread: 3 Guest(s)