This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Prototypep's profile picture

RedSend: ComputerCraft's Social Network

Started by Prototypep, 07 April 2013 - 08:42 AM
Prototypep #1
Posted 07 April 2013 - 10:42 AM
This sentence is supposed to give a brief overview, but I'm too lazy to write one. :)/>
​RedSet is a program where computers can send messages to other computers, but has custom username support and is easy to set up! Just add the program to your computer, turn on the modem, type in your username, and you're finished!

​FEATURES:
  • Easy setup
  • Download easily with pastebin!
  • Connection between computers made easy
CODE:

local oldPull=os.pullEvent
os.pullEvent=os.pullEventRaw
function RedSend()
term.setTextColor(colors.red)
print (“What side is your modem on?”)
input = read()
rednet.open( input )
print (“What is your username?”)
input = read()
user = “[“..input..”] “ --Fixed
term.clear()
term.setTextColor(colors.cyan)
function1 = function()
while true do
term.setCursorPos(1,19)
term.clearLine()
write (user)
input = read()
rednet.broadcast (user, input)
end
end
function2 = function()
while true do
print (rednet.receive()) --Receive spelled wrong.
--sleep(0.5) Removed
end
function waitTerminate()
  os.pullEventRaw("terminate")
  os.pullEvent = oldPull
end
end
parallel.waitForAll (function1, function2, waitTerminate)
end
RedSend()
term.clear()
term.setCurosrPos(1,1)
print("Done with RedSend!")
PASTEBIN:
http://www.pastebin.com/DrE2gAzy

Some credit goes to

MudkipTheEpic

and

theoriginalbit

for testing and fixing the program.
Prototypep #2
Posted 07 April 2013 - 10:45 AM
This program has NOT BEEN TESTED! Pastebin isn't working for me…
It would be nice if someone could test this for me, and give me feedback. Thanks! :)/>
The program has been tested! :D/>
FuuuAInfiniteLoop(F.A.I.L) #3
Posted 07 April 2013 - 02:57 PM
This is forums is only for posting finished programs, use ask a pro oor test it yourself with cc-emu
Prototypep #4
Posted 08 April 2013 - 12:21 AM
Sorry. Also, I will try to test the program again, hopefully my pastebin is working again.
MudkipTheEpic #5
Posted 08 April 2013 - 12:22 PM

local oldPull=os.pullEvent --Added
os.pullEvent=os.pullEventRaw --Added
function RedSend()
term.setTextColor(colors.red)
print (“What side is your modem on?”)
input = read()
rednet.open( input )
print (“What is your username?”)
input = read()
user = “[“..input..”] “ --Fixed
term.clear()
term.setTextColor(colors.cyan)
function1 = function()
while true do
term.setCursorPos(1,19)
term.clearLine() --Added
write (user)
input = read()
rednet.broadcast (user, input)
end
end
function2 = function()
while true do
print (rednet.receive()) --Receive spelled wrong.
--sleep(0.5) Removed
end

function waitTerminate() --Added the whole function
  os.pullEventRaw("terminate")
  os.pullEvent=os.pullEventRaw
end
end --Added

parallel.waitForAll (function1, function2, waitTerminate)
end --Added
RedSend()
term.clear() --Added
term.setCurosrPos(1,1) --Added
print("Done with RedSend!") --Added

Fixed some stuff. :P/>
theoriginalbit #6
Posted 08 April 2013 - 04:24 PM
This is forums is only for posting finished programs, use ask a pro oor test it yourself with cc-emu
Uhhh no. While I agree with the whole "test it yourself", because everyone should test their scripts at least once before releasing, this could have been approached in a more tactful way. Also where have you been the last few months, "PUBLIC ALPHAS", "PUBLIC BETAS" and all that is essentially like asking "Can someone test my code for bugs". At some point someone outside of the development circle should bug test and/or use the program, they can find things developers cannot, we are the developers of the program, we know what its meant to do, so sometimes we cannot always find bugs.


-snippety snip-
line 30, should be

os.pullEvent = oldPull
or else the computer will crash, not error, crash, due to stack overflow.
SuicidalSTDz #7
Posted 08 April 2013 - 04:57 PM
Also where have you been the last few months, "PUBLIC ALPHAS", "PUBLIC BETAS" and all that is essentially like asking "Can someone test my code for bugs"
Oh TOBIT, you wild stallion. Let's be nice shall we :D/> (Pfft, as if :P/>)

Main Post: So what is this, some sort of E-mail system?
Prototypep #8
Posted 09 April 2013 - 12:59 AM

local oldPull=os.pullEvent --Added
os.pullEvent=os.pullEventRaw --Added
function RedSend()
term.setTextColor(colors.red)
print (“What side is your modem on?”)
input = read()
rednet.open( input )
print (“What is your username?”)
input = read()
user = “[“..input..”] “ --Fixed
term.clear()
term.setTextColor(colors.cyan)
function1 = function()
while true do
term.setCursorPos(1,19)
term.clearLine() --Added
write (user)
input = read()
rednet.broadcast (user, input)
end
end
function2 = function()
while true do
print (rednet.receive()) --Receive spelled wrong.
--sleep(0.5) Removed
end

function waitTerminate() --Added the whole function
  os.pullEventRaw("terminate")
  os.pullEvent=os.pullEventRaw
end
end --Added

parallel.waitForAll (function1, function2, waitTerminate)
end --Added
RedSend()
term.clear() --Added
term.setCurosrPos(1,1) --Added
print("Done with RedSend!") --Added

Fixed some stuff. :P/>
This is forums is only for posting finished programs, use ask a pro oor test it yourself with cc-emu
Uhhh no. While I agree with the whole "test it yourself", because everyone should test their scripts at least once before releasing, this could have been approached in a more tactful way. Also where have you been the last few months, "PUBLIC ALPHAS", "PUBLIC BETAS" and all that is essentially like asking "Can someone test my code for bugs". At some point someone outside of the development circle should bug test and/or use the program, they can find things developers cannot, we are the developers of the program, we know what its meant to do, so sometimes we cannot always find bugs.


-snippety snip-
line 30, should be

os.pullEvent = oldPull
or else the computer will crash, not error, crash, due to stack overflow.

Thanks for helping! I gave you credit at the original post.
Prototypep #9
Posted 10 April 2013 - 12:02 AM
The program has been tested and fixed!
spyman68 #10
Posted 10 April 2013 - 12:14 AM
No offense but there are at least three good IRCs out there, DarkIRC, NovaIRC, and another I can't think of the name. You'rs had so many errors when I downloaded it.
Prototypep #11
Posted 10 April 2013 - 08:39 AM
Well, I'm sorta new. And, as you can see, I'm "clueless." Not really, but I'm still new.
spyman68 #12
Posted 10 April 2013 - 10:05 AM
Oh ok, and btw, the third IRC is called Chatbox I think