Jump to content

Recommended Posts

Posted

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

Posted

The function rednet.receive() doesn't need anything inside the brackets other than the timeout.

Posted

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.

Posted

The eof expected? That means that there is an end statement at line 4 which has no function to end. Remove it.

Posted

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.

Posted

Nope, just the plain number.

Eg:

rednet.send(2,"Hi This Is My Password It Is Secret Honest")

Posted

Don't change it D:

I was enjoying laughing at it!

Did you try putting the password in speech marks?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...