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 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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...