Posted 28 December 2013 - 03:24 PM
Can someone please fix my script!
My system uses two computers and two scripts and uses rednet to transmit new feeds
but the feed computer (the computer that displays the feed won't receive the broadcasted message from the Feed Updater computer which you can type in the new feed and it sends it via rednet!
I have been working hard on this and it needs fixing.
I also made a map that demonstrates the setup, which vital to see to understand the scripts. (Here is the link: https://www.mediafir...mm63mxisxmieaby )
You also need the resource pack which has the scripts. (Use it with the map and test the scripts) (I attached the resource pack to the post)
Instructions:
Select the resource pack
open my map
Launch the bulletin computer by going into it and launching a program called recieveFeed (I know i spelt receive wrong but thats how I named my program!
Go into the feedUpdate Computer and type in feedUpdate
then type in the new bulletin message
hit enter
You notice that the bulletin computer doesn't receive the rednet broadcast from the feedUpdate computer!
feedUpdate script
My system uses two computers and two scripts and uses rednet to transmit new feeds
but the feed computer (the computer that displays the feed won't receive the broadcasted message from the Feed Updater computer which you can type in the new feed and it sends it via rednet!
I have been working hard on this and it needs fixing.
I also made a map that demonstrates the setup, which vital to see to understand the scripts. (Here is the link: https://www.mediafir...mm63mxisxmieaby )
You also need the resource pack which has the scripts. (Use it with the map and test the scripts) (I attached the resource pack to the post)
Instructions:
Select the resource pack
open my map
Launch the bulletin computer by going into it and launching a program called recieveFeed (I know i spelt receive wrong but thats how I named my program!
Go into the feedUpdate Computer and type in feedUpdate
then type in the new bulletin message
hit enter
You notice that the bulletin computer doesn't receive the rednet broadcast from the feedUpdate computer!
feedUpdate script
rednet.open("back")
print("Insert Bulletin Feed")
currentFeed = read()
print("Bulletin now set to " .. currentFeed)
print("Please restart all Bulletin Computers to display new feed in 5 minutes")
rednet.broadcast(currentFeed)
recieveFeed script
input1 = "shell"
monitor = peripheral.wrap("right")
monitor.setTextScale(1)
repeat
term.clear()
term.setCursorPos( 1, 1 )
local nTime = os.time()
print("Welcome to Nom Inc, Nuclear Laboratories")
id, newFeed = rednet.receive()
if id == 20 then
print( "Feed: " .. newFeed)
print( "The time is "..textutils.formatTime( nTime, false ) )
if nTime < 18 and nTime > 6 then
print("Have a good day!")
else
print("Have a good night!")
end
input = read(" ")
if input == input1 then
print("Booting Back Into Shell.")
print("Bypassing Bootloader.") --This is a joke
print("Done.")
os.shutdown()
else
print("Error!")
end
end
until false
Edited on 28 December 2013 - 02:50 PM