ChargedCreeperBrony Posted December 6, 2012 Share Posted December 6, 2012 this one is actialy for minecraft 1.4.2 i have created an password program in 1.2.5, but somehow in 1.4.2 it doesnt work. this is my program: computer 1 (input): edit startup: print("text") rednet.open("side") ctrl save ctrl exit edit password: print("text") rednet.send("computer 2's ID", password) os.reboot() ctrl save ctrl exit ---------------------------------------------------------------------------------------------------- computer 2 (output): edit startup: rednet.open("side") id, message = rednet.receive("computer 1's ID", password) if message == "password" then redstone.SetOutput("side", true) sleep(5) redstone.SetOutput("side", false) os.reboot() end ctrl save ctrl exit ---------------------------------------------------------------------------------------------------- when i start the 2nd computor it gives this error: rednet :400: number expected this is the error i et when i enter the password: bios:338: [string "password"] :4: '<eof>' expected i realy REALY need help -thanks Link to comment Share on other sites More sharing options...
theprolo Posted December 6, 2012 Share Posted December 6, 2012 The function rednet.receive() doesn't need anything inside the brackets other than the timeout. Link to comment Share on other sites More sharing options...
ChargedCreeperBrony Posted December 6, 2012 Author Share Posted December 6, 2012 The function rednet.receive() doesn't need anything inside the brackets other than the timeout. and the timeout is...? the id? EDIT: yes Link to comment Share on other sites More sharing options...
theprolo Posted December 6, 2012 Share Posted December 6, 2012 The timeout is optional, and only required if you want your program to stop receiving after a certain amount of time. Saying rednet.receive(5) will make your program stop receiving anything after 5 seconds and move on to the next line of code. Link to comment Share on other sites More sharing options...
ChargedCreeperBrony Posted December 6, 2012 Author Share Posted December 6, 2012 and how about computer 1? Link to comment Share on other sites More sharing options...
theprolo Posted December 6, 2012 Share Posted December 6, 2012 The eof expected? That means that there is an end statement at line 4 which has no function to end. Remove it. Link to comment Share on other sites More sharing options...
ChargedCreeperBrony Posted December 6, 2012 Author Share Posted December 6, 2012 now i get this error in copmuter 1: rednet :347: positive number expected Link to comment Share on other sites More sharing options...
theprolo Posted December 6, 2012 Share Posted December 6, 2012 Check that you haven't put a - in front of the 2nd computer's ID. It sounds like you entered a negative number instead of the real ID, so double check. Link to comment Share on other sites More sharing options...
ChargedCreeperBrony Posted December 6, 2012 Author Share Posted December 6, 2012 does there has to be a # before it? Link to comment Share on other sites More sharing options...
nedned2k Posted December 6, 2012 Share Posted December 6, 2012 If the ID is in quotation marks, it shouldn't be. Also, you might want to take a second look at the spelling of the title of this thread. Link to comment Share on other sites More sharing options...
theprolo Posted December 6, 2012 Share Posted December 6, 2012 Nope, just the plain number. Eg: rednet.send(2,"Hi This Is My Password It Is Secret Honest") Link to comment Share on other sites More sharing options...
ChargedCreeperBrony Posted December 6, 2012 Author Share Posted December 6, 2012 Also, you might want to take a second look at the spelling of the title of this thread. wut? Link to comment Share on other sites More sharing options...
nedned2k Posted December 6, 2012 Share Posted December 6, 2012 "cumputercraft" Link to comment Share on other sites More sharing options...
ChargedCreeperBrony Posted December 6, 2012 Author Share Posted December 6, 2012 Nope, just the plain number. Eg: rednet.send(2,"Hi This Is My Password It Is Secret Honest") ah so those '' '' arent supposed to be there Link to comment Share on other sites More sharing options...
theprolo Posted December 6, 2012 Share Posted December 6, 2012 wut? Just leave it, and try copying the example I gave you to see if that works. Link to comment Share on other sites More sharing options...
nedned2k Posted December 6, 2012 Share Posted December 6, 2012 ah so those '' '' arent supposed to be there Not for numbers, no Link to comment Share on other sites More sharing options...
ChargedCreeperBrony Posted December 6, 2012 Author Share Posted December 6, 2012 "cumputercraft" OH GOD I CANT CHANGE IT XD and there is ''cum'' in it Link to comment Share on other sites More sharing options...
ChargedCreeperBrony Posted December 6, 2012 Author Share Posted December 6, 2012 rednet :3 5 0: string expected -_- Link to comment Share on other sites More sharing options...
theprolo Posted December 6, 2012 Share Posted December 6, 2012 Don't change it D: I was enjoying laughing at it! Did you try putting the password in speech marks? Link to comment Share on other sites More sharing options...
ChargedCreeperBrony Posted December 6, 2012 Author Share Posted December 6, 2012 oh wait those '' '' are now supposed for the password XD Link to comment Share on other sites More sharing options...
ChargedCreeperBrony Posted December 6, 2012 Author Share Posted December 6, 2012 computer 2: startup:4: attempt to call nill Link to comment Share on other sites More sharing options...
nedned2k Posted December 6, 2012 Share Posted December 6, 2012 the S in redstone.SetOutput(...) should be lower case Link to comment Share on other sites More sharing options...
ChargedCreeperBrony Posted December 6, 2012 Author Share Posted December 6, 2012 lol cant test it yet, night Link to comment Share on other sites More sharing options...
ChargedCreeperBrony Posted December 6, 2012 Author Share Posted December 6, 2012 YES IT WORKS, oh thank you 2 so much! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now