So as a real newbie in LUA I don't know how to do this, very simple thing.
I have 2 variables let's call them A and B, and I am trying to make the user input both of their values.
A = read()
B = read()
This ofcourse won't work, as this means A is equal to B, I want the user to put in their values, them being completely independant from eachother. This is probably real simple, I just don't know how to.
Thanks in advance
1
use read() 2 times
Started by J0P5, Mar 07 2012 11:54 AM
4 replies to this topic
#1
Posted 07 March 2012 - 11:54 AM
#2
Posted 07 March 2012 - 12:07 PM
You should really try it before posting it, because doing what you posted will do exactly what you want it to!
read is a function, and it'll do the same thing each time you call it: let the user input some text.
read is a function, and it'll do the same thing each time you call it: let the user input some text.
#3
Posted 07 March 2012 - 12:12 PM
Advert, on 07 March 2012 - 12:07 PM, said:
You should really try it before posting it, because doing what you posted will do exactly what you want it to!
read is a function, and it'll do the same thing each time you call it: let the user input some text.
read is a function, and it'll do the same thing each time you call it: let the user input some text.
Advert, on 07 March 2012 - 12:07 PM, said:
You should really try it before posting it, because doing what you posted will do exactly what you want it to!
read is a function, and it'll do the same thing each time you call it: let the user input some text.
read is a function, and it'll do the same thing each time you call it: let the user input some text.
hahaha what a fail by me! Thanks.
I did actually try this before, but it didn't work. I now figured out it was something else that was making it not work.
#4
Posted 06 August 2012 - 07:07 PM
Is it possible to read Two variables of a sent message that are both in the message part of rednet.send (sorry if this is confusing...)
ex*
rednet.receive(1)
M = io.read()
I = io.read()
(sent message: 5 Hello )
as in send message: Hello to computer 5
ex*
rednet.receive(1)
M = io.read()
I = io.read()
(sent message: 5 Hello )
as in send message: Hello to computer 5
#5
Posted 06 August 2012 - 08:17 PM
Just send two messages to computer 5.
Next time, make a topic in this subforum.
Next time, make a topic in this subforum.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users