Page 1 of 1
Question

Posted:
Wed Jan 07, 2015 22:51
by nanepiwo
If i have two params from a chat command, how can i output them separately?
Re: Question

Posted:
Wed Jan 07, 2015 23:04
by rubenwardy
You can use: local arr = param:split(" ")
/foo one two
To get one, arr[1]
To get two, arr[2]
You could use string:match instead if one of the params uses spaces, but I can never remember how to use it.
Re: Question

Posted:
Wed Jan 07, 2015 23:10
by nanepiwo
Okay, thanks!
I'll look into string:match