1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
parameter = {} i = 0 	 for word in string.gmatch(txt, "pattern") do 	i = i + 1 		 	parameter[i] = word 	 end 	 	 for _, i in ipairs(parameter) do print(i) end end
Hello people, tomorrow, i tried another way to catch strings, and I can't find a way to capture it properly.
"txt" is a global variable which represents what player typed.
"pattern" is a parameter to find some special strings, like alphanumerics, hexadecimals, numbers, etc.
The list of patterns are found here: http://www.lua.org/manual/5.1/manual.html#5.4.1
Results in "print(i)" with the input "/dir 1":
I wanna a solution to catch a output with these values, when I type "/dir 1"
parameter[1] = /dir
parameter[2] = 1
Anyone has ideas?