Howd you make a rednet-enabled server?
#1
Posted 30 January 2016 - 06:09 PM
#2
Posted 30 January 2016 - 06:30 PM
to do your example you will need the rednet API and the fs API
Edited by Lupus590, 30 January 2016 - 06:33 PM.
#3
Posted 30 January 2016 - 06:56 PM
#4
Posted 30 January 2016 - 09:19 PM
--#I have made no effort to make sure that this is valid lua local file = fs.open(filepath,"a") while true file.write(rednet.receive()) file.flush() end
Edited by Lupus590, 31 January 2016 - 02:15 PM.
#5
Posted 30 January 2016 - 11:50 PM
Lupus590, on 30 January 2016 - 09:19 PM, said:
--#I have made no effert to make sure that this is valid lua local file = fs.open(filepath,"a") while true file.write(rednet.receive()) file.flush() end
file.close()unless you're not gonna add a break to the program
while true do --#instead of while true
Edited by Waitdev_, 30 January 2016 - 11:52 PM.
#6
Posted 31 January 2016 - 02:15 PM
Waitdev_, on 30 January 2016 - 11:50 PM, said:
while true do --#instead of while true
Lupus590, on 30 January 2016 - 09:19 PM, said:
--#I have made no effort to make sure that this is valid lua
and yes, you should close your file at some point
Edited by Lupus590, 31 January 2016 - 02:16 PM.
#7
Posted 31 January 2016 - 03:14 PM
#8
Posted 31 January 2016 - 05:21 PM
ry00000, on 31 January 2016 - 03:14 PM, said:
To make a bank program, you'd need a 'server' to save the account names,passwords, and balances of each user.
Then a client program would send requests to the server, like creating an account or transferring funds.
What does a turtle have to do with anything?
#10
Posted 05 February 2016 - 12:05 PM
#11
Posted 05 February 2016 - 01:29 PM
there is also the problem of distinguising between regular clients and ATMS's, i dont know what sort of features you will have but these are some guidelines
Edited by wilcomega, 05 February 2016 - 01:32 PM.
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











