[1.5+] Dark Chat - rednet chat program! (Works on 1.6+)
#21
Posted 17 March 2013 - 07:01 AM
#22
Posted 17 March 2013 - 07:58 AM
#23
Posted 19 March 2013 - 08:43 AM
momona5, on 25 February 2013 - 05:22 AM, said:

Delete that line
(For example:
input = read()
print(input)
rednet.send(input)
rednet.receive()
)
delete 'print(input)' here
#24
Posted 19 March 2013 - 12:39 PM
momona5, on 17 March 2013 - 07:01 AM, said:
When you type '/exit' the function is called in the commands table (comD), it then queues the event 'exit' which the function 'exitEventListen' is waiting for, when that function returns it causes parallel function to also return, exiting the program.
If you wanted to run a program on exit, you could either add shell.run("<program name>") right at the bottom under parallel or add another function in to run after the parallel function has returned.
Hope this helps
urielsalis, on 17 March 2013 - 07:58 AM, said:
YoYoYonnY, on 19 March 2013 - 08:43 AM, said:
momona5, on 25 February 2013 - 05:22 AM, said:
Delete that line
(For example:
input = read()
print(input)
rednet.send(input)
rednet.receive()
)
delete 'print(input)' here
This was fixed ages ago...
#25
Posted 26 March 2013 - 07:45 AM
darkrising, on 19 March 2013 - 12:39 PM, said:
momona5, on 17 March 2013 - 07:01 AM, said:
When you type '/exit' the function is called in the commands table (comD), it then queues the event 'exit' which the function 'exitEventListen' is waiting for, when that function returns it causes parallel function to also return, exiting the program.
If you wanted to run a program on exit, you could either add shell.run("<program name>") right at the bottom under parallel or add another function in to run after the parallel function has returned.
Hope this helps
- snip -
I tried tweaking this part. Gives me an error when i open some other things and has a little blinking cursor even when other programs are running.
function exitEventListen()
while true do
os.pullEvent("exit")
modem.closeAll()
term.clear()
term.setCursorPos(1,1)
shell.run("/mrom/menus/rednet")
return exit
end
end
also tried this
function exitEventListen()
while true do
os.pullEvent("exit")
modem.closeAll()
term.clear()
term.setCursorPos(1,1)
return
shell.run("/mrom/menus/rednet")
end
end
EDIT: The error it gave me was this:
parallel:22: serialize:1: attemp to index ? (a nil value)
#26
Posted 26 March 2013 - 07:56 AM
#27
Posted 27 March 2013 - 08:22 AM
#28
Posted 27 March 2013 - 08:24 AM
momona5, on 26 March 2013 - 07:45 AM, said:
Line 308:
["exit"] = {
run = function()
rSend("has quit.", true)
os.queueEvent("exit")
end,
help = ""
},
try:
["exit"] = {
run = function()
rSend("has quit.", true)
os.queueEvent("exit")
shell.run("/mrom/menus/rednet")
end,
help = ""
},
#30
#31
Posted 02 July 2013 - 11:38 AM
#33
Posted 02 July 2013 - 07:37 PM
#34
Posted 03 July 2013 - 03:34 AM
encrypted, on 02 July 2013 - 07:37 PM, said:
Yeah, I made this program to be extendible, its quite easy to add more commands, just make a new table in the comD table with a run function and help variable.
You can pretty much add whatever you want
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











