1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function luafile(path) 	t = {} 	i = 0 	for word in string.gmatch(path,".") do 		i = i + 1 		t[i] = word 	end 	table.sort(t,function(a,b) return a>b end) 	remov=false 	for num,val in pairs(t) do 		if val=="/" then 				remov=true 				table.remove(t,num) 			end 		end 		if remov==true then 			table.remove(t,num) 		end 	end 	table.sort(t) 	return table.concat(t) end print(luafile("sys/lua/pointscript.lua"))


1
.aaciillnopprsssttuuy
EDIT: it has been fixed. i use string.sub
edited 1×, last 22.07.12 12:53:45 pm