Accociative I think... (can't spell)
How do I sort it...
for vRANGE,vNET in Table do
local _,_,RANGE1,RANGE2 = strfind(vRANGE, "(%S+)-(%S+)")
curUser:sendmessage(BOTNAME," Range: "..RANGE1.." - "..RANGE2.."\t\tNetwork: "..vNET)
end
plz help me...
/NL
not 2 sure but this might work.
local temp = {}
for vRANGE,vNET in Table do
tinsert(temp, vRANGE)
end
sort(temp)
for i=1,getn(temp) do
local _,_,RANGE1,RANGE2 = strfind(temp[i], "(%S+)-(%S+)")
curUser:sendmessage(BOTNAME," Range: "..RANGE1.." - "..RANGE2.."\t\tNetwork: "..Table[temp[i]])
end
plop
nightlitch... it depends if you have IP s to sort then you will need to use the sort func of the logger.
if you sort it with LUA sort function... tings could get mixed up like 230.0.0.0 above 32.0.0.0 but if you sort it by name then plops idea is the one, in any case you will need to first creat a non associative table like plop did.
tinsert(temp,value)
the sort func of the logger, computes the IP and compares it with the next one
ends up something like this
sort(table, function(a,b) return(Compute(a) < Compute(b)) end)
you need the the compute function.