58 posts
Posted 05 February 2014 - 05:04 PM
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/Yfmk9KWDProgram 2 "Client"
Its on line 19 and has the same problem as above
http://pastebin.com/wHgMYJghAny other pointers or advice?
Thanks for you help
1281 posts
Posted 05 February 2014 - 05:07 PM
You're using "=" instead of "==" to compare values. "=" is used to define values.
58 posts
Posted 05 February 2014 - 05:14 PM
You're using "=" instead of "==" to compare values. "=" is used to define values.
Thanks I knew It would be something stupid
58 posts
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
Edited on 05 February 2014 - 04:26 PM
286 posts
Location
United States
Posted 05 February 2014 - 11:17 PM
So are you still having a problem or did you solve it?
47 posts
Location
tekkit.craftersland.net:25567
Posted 05 February 2014 - 11:52 PM
And, for the first program, to display variables in strings you can simply do:
let's say
local x= 5
print("My ID is: "..x)
Edited on 05 February 2014 - 10:52 PM
286 posts
Location
United States
Posted 06 February 2014 - 12:04 AM
Jim –
"How others see you does not matter. What matters is how you see yourself."-Unknown.
I a take off of:
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
Edited on 05 February 2014 - 11:06 PM
47 posts
Location
tekkit.craftersland.net:25567
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]
58 posts
Posted 06 February 2014 - 08:24 AM
Thanks Ive got it fixed.