Page 2 of 2

Re: (WIP) Martix setup

Posted: Sun Jan 04, 2009 12:56 pm
by RobertBell

Code: Select all

retString = HC.AttributeGetValue('1/10')
for level in string.gmatch(retString ,"%d+") do
  -- do your thing here - I'm just printing the levels seperated by a space to show I got them
  print(level .. ' ')
end

Re: (WIP) Martix setup

Posted: Sun Jan 04, 2009 3:46 pm
by RobertBell
Sorry - that was a Lua solution. In VB.Net, you should be able to get the retrun string from the Lua print(). It will be a long string deliminated by tabs. If your return string is 'retString', in .net you should be able to make an array
dim s() as string = retString.Split(vbTab) then iterate through s()

for i = 0 to s.GetUpperBound(0)
do something with s(i) here
next i

Re: (WIP) Martix setup

Posted: Sun Jan 04, 2009 4:39 pm
by tom
Cool, thanks. I wrestled with that first bit of code for a little but i could'nt make head nor tails of it :D

In the end i got it with :
(vbTab, ",")

then split(",")

I guess that was a bit redundant as i read split(vbTab) would have done it too. Oh well it works.