I've been playing with computercraft for about a week now and I'm new to this coding thing. I've managed to write a script for an elevator running on redpower frames. It's painstaikingly slow, but it seemed like a good project to get into computercraft. I love the fact that it works, but it's only 3 floors and for every floor I need a seperate function which could be quite lengthy if there's 20 floors or more. Is there a way to be rid of that?
The code has two computers communicating over rednet, one inside the elevator and one by the framemotors.
The elevator code:
http://pastebin.com/LdWuyPt3
The menu table thing I got from an lp on youtube called "Computerizing Minecraft"
The framemotor code:
http://pastebin.com/wS4WgZVX
On another note, if anyone could direct me to a tutorial on any menu I'd be grateful. Still haven't figured out how to add a border to this one.
Thanks in advance ^^
edit: I figure I can make it work if I could send 2 variables over rednet, I have no idea how to do that though.
Nera