22 posts
Posted 27 March 2013 - 07:35 AM
hello im trying to create an elevator setup with CC and RP2
so im trying to put up a program that i will have a computer inside my elevator attached to frame that will send rednet signals to turtle that will send a
Freq to my wireless reciver that will do the job
problams:
idk how to create a panel inside the computer
idk why but every time i sending a rednet signal to my turtle he not accepting it he allways go with the else option
if someone can help me with i will be Happy
8543 posts
Posted 27 March 2013 - 07:38 AM
Please post your current code.
22 posts
Posted 27 March 2013 - 08:10 AM
1190 posts
Location
RHIT
Posted 27 March 2013 - 08:15 AM
local senderID = os.pullEvent(rednet_message)
if (senderID == "58") then
You're trying to compare the id to a string. integers and strings are different. It should be
if senderID == 58 then
Also, rednet_message should be enclosed in quotes like so:
local senderID = os.pullEvent("rednet_message")
22 posts
Posted 27 March 2013 - 08:46 AM
ok and how do i make the panel?
and its still print no
1190 posts
Location
RHIT
Posted 27 March 2013 - 09:40 AM
What do you mean by a panel inside of a computer?
And if the sender ID does not equal 58 then it would still print no.
Edit:
Actually your problem is here:
local senderID = os.pullEvent(rednet_message)
os.pullEvent() returns the event first. So your code should be:
local event, senderID = os.pullEvent("rednet_message")
22 posts
Posted 27 March 2013 - 10:09 AM
yeah i mean like you can choose which floors you want to go not by typing
else by draging in side the computer
i did all the fixes you said and still i getting NO and the computer id is 58 i check so its the program if any one can put up a Panel and this turtle program
i will be Happy
1190 posts
Location
RHIT
Posted 27 March 2013 - 10:15 AM
So you mean you want a graphical user interface?
That would require quite a bit more effort, but is certainly possible. There are a few tutorials on doing such things in the tutorial section: go check it out, and if you still need help then come back here with some code and I or another pro will walk you through it.
22 posts
Posted 27 March 2013 - 09:14 PM
ok Ty