Posted 08 February 2014 - 02:56 PM
Hi, so I am new at programming (try a week and a half new) and have been only using computercraft actively (other than using the tunnel program on a mining turtle) just as long. I have been playing with computercraft on the tekkit platform which currently uses minecraft 1.5.2. . Tekkit uses open peripheral so I am writing a program to retrieve info from a connected redstone energy cell and send it to a specific connected/networked monitor. I have had a few problems along the way but generally I have been able fix them on my own with a bit of reading. This one however I can't find useful information on it
I read another page on it but it was never resolved, also I wanted to know of any other errors I may have missed in writing the code (I know most of the broader principles but some of the finer points are difficult for me). This is the pastebin link
http://pastebin.com/mXJy654V
Notes: Yes, I checked 15 times to make sure the modems were connected and active, I also used the Lua prompt and was able to manually run methods and apis like print(), getType(), and setCursorBlink() (with arguments of course). on the networked monitors without issue.
Lines 44, and 45 are purely diagnostic, I was trying to figure out how the program was interpreting those variables since one of the previous problems was that It could not locate or get the type of peripheral the monitor was, this may still be the case still but I can't tell since I can't get around the previously mentioned error.
I know that the functions are out of order, I built this off of a program I wrote previously which did roughly the same thing but only for a terminal/computer, this was made so I can send the info to a networked monitor.
Side Questions: How do you make a program so it accepts extra user arguments, eg, in the case of the copy, "copy <source> <destination>" I already know how to do the first one using
Can you send a program directly to a networked monitor using its ID in a similar fashion to the monitor program, that might make things much simpler.
any help is appreciated.
Peripheral :20: Expected string
I read another page on it but it was never resolved, also I wanted to know of any other errors I may have missed in writing the code (I know most of the broader principles but some of the finer points are difficult for me). This is the pastebin link
http://pastebin.com/mXJy654V
Notes: Yes, I checked 15 times to make sure the modems were connected and active, I also used the Lua prompt and was able to manually run methods and apis like print(), getType(), and setCursorBlink() (with arguments of course). on the networked monitors without issue.
Lines 44, and 45 are purely diagnostic, I was trying to figure out how the program was interpreting those variables since one of the previous problems was that It could not locate or get the type of peripheral the monitor was, this may still be the case still but I can't tell since I can't get around the previously mentioned error.
I know that the functions are out of order, I built this off of a program I wrote previously which did roughly the same thing but only for a terminal/computer, this was made so I can send the info to a networked monitor.
Side Questions: How do you make a program so it accepts extra user arguments, eg, in the case of the copy, "copy <source> <destination>" I already know how to do the first one using
local variable =...
but I don't know how to add a second or any more after thatCan you send a program directly to a networked monitor using its ID in a similar fashion to the monitor program, that might make things much simpler.
any help is appreciated.