Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user_name = io.read("*l") --makes an input variable for a username
- display_name = io.read("*l") --makes an input variable for a display name
- bio = io.read("*l") --makes an input variable for a bio/description
- player = user_name + display_name + bio --adds all of them together in a single variable
- print(player) --the single variable is printed
- --other forms of input:
- number = io.read("*n") -- a number assigned a variable
- variable1 = io.read("*l") -- default input
- a = io.read("*a") -- total stdin
- x = io.read(7) -- 7 characters assigned a variable
- x,y = io.read(7,15) -- 7 to 15 characters assigned two variables
- a,b = io.read("*n","*n") --two numbers assigned two variables
- io.write('Hello, what is your name? ') -- question
- local name = io.read() --variable input
- io.write('Nice to meet you, ', name, '!\n') --prints input
- --for more lua, see here: https://pastebin.com/FKbinHk1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement