Question
- rubenwardy
- Moderator
- Posts: 6364
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: United Kingdom
- Contact:
Re: Question
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.
/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.
Core Developer | Donate | My Twitter | Mods | Mods 4 Android | Node Box Editor | Minetest Modding Book
Hello profile reader
Hello profile reader
-
- Member
- Posts: 23
- Joined: Mon Jan 05, 2015 20:13
- GitHub: nanepiwo
- IRC: nanepiwo or nane
- In-game: nanepiwo
Re: Question
Okay, thanks!
I'll look into string:match
I'll look into string:match
Who is online
Users browsing this forum: No registered users and 3 guests