This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Rushmead's profile picture

Server Gettting Info From Client...

Started by Rushmead, 06 June 2012 - 06:42 AM
Rushmead #1
Posted 06 June 2012 - 08:42 AM
Hello!


well Basiclly I own a coffeeshop on a server and i wanted it so te client selects what they want on the computer With a menu and then it tells the server downstairs what he wants…… If i have the Menu allready what is the server one?
my_hat_stinks #2
Posted 06 June 2012 - 10:44 AM
What exactly do you want to know? How to send a message from one computer to another?
Rushmead #3
Posted 06 June 2012 - 07:56 PM
Yes Technicaly
Zepher48 #4
Posted 07 June 2012 - 02:47 AM
This helped me alot when sending information back and forth to computers
http://computercraft...le=Rednet_(API)

the function you would need to use is
rednet.send( receiverID,message )


so from you menu computer where the user enters their choice, after they enter their choice
enter this
 rednet.send(ID,menuChoice) 
make sure ID is the id of the server computer and whatever variable you use for the menu choice put that there

then for the server make a loop that reads the choices
while true do
ID,menuChoice = rednet.receive() -- ID is the id of your menu computer, and menu choice is their choice
print("Order is: "..menuChoice)
end
and this will keep printing out menu choices every time the menu sends the server one


Hope this helps =D
Rushmead #5
Posted 07 June 2012 - 08:39 AM
This helped me alot when sending information back and forth to computers
http://computercraft...le=Rednet_(API)

the function you would need to use is
rednet.send( receiverID,message )


so from you menu computer where the user enters their choice, after they enter their choice
enter this
 rednet.send(ID,menuChoice) 
make sure ID is the id of the server computer and whatever variable you use for the menu choice put that there

then for the server make a loop that reads the choices
while true do
ID,menuChoice = rednet.receive() -- ID is the id of your menu computer, and menu choice is their choice
print("Order is: "..menuChoice)
end
and this will keep printing out menu choices every time the menu sends the server one


Hope this helps =D

It Does… But if i have a Menu GUI and they select it would it still work?