I've just got back into CC again and was looking into rednet but I've got snagged on a while loop. Could someone explain my mistake?
Program 1 "Host"
Its on line 16 and says it expects "do" but theres a do there
http://pastebin.com/Yfmk9KWD
Program 2 "Client"
Its on line 19 and has the same problem as above
http://pastebin.com/wHgMYJgh
Any other pointers or advice?
Thanks for you help
1
Bit rusty I've got stuck on a while loop :/
Started by makeme, Feb 05 2014 05:04 PM
8 replies to this topic
#1
Posted 05 February 2014 - 05:04 PM
#2
Posted 05 February 2014 - 05:07 PM
You're using "=" instead of "==" to compare values. "=" is used to define values.
#4
Posted 05 February 2014 - 05:23 PM
Ive changed that but now it displays its own ID to the screen but when it gets to line 18 in Program 1 / 20 in program 2 it errors saying attempt to call nil
Edit wait damn spelling mistake ffs
Edit wait damn spelling mistake ffs
Edited by makeme, 05 February 2014 - 05:26 PM.
#5
Posted 05 February 2014 - 11:17 PM
So are you still having a problem or did you solve it?
#6
Posted 05 February 2014 - 11:52 PM
And, for the first program, to display variables in strings you can simply do:
let's say
let's say
local x= 5 print("My ID is: "..x)
Edited by Jim, 05 February 2014 - 11:52 PM.
#7
Posted 06 February 2014 - 12:04 AM
Jim --
I a take off of:
Jim, on 05 February 2014 - 11:52 PM, said:
"How others see you does not matter. What matters is how you see yourself."-Unknown.
I a take off of:
Quote
I have no right, by anything I do or say, to demean a human being in his own eyes. What matters is not what I think of him; it is what he thinks of himself. To undermine a man's self-respect is a sin.
Antoine de Saint-Exupery
Antoine de Saint-Exupery
Edited by surferpup, 06 February 2014 - 12:06 AM.
#8
Posted 06 February 2014 - 12:18 AM
[OFFTOPIC] Yah, had just seen that somewhere and I thought it was cool. Thanks for that tip on the source. [/OFFTOPIC]
#9
Posted 06 February 2014 - 08:24 AM
Thanks Ive got it fixed.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users