Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

standinonstilts

Members
  • Content Count

    3
  • Joined

  • Last visited

About standinonstilts

  • Rank
    Junior Member
  1. my code was very close to yours. the only difference was that instead of creating a function inside the thread.create(), I created a seperate function named handleMessage() and called it as: local t1 = thread.create(handleMessage()) whenever I do this, I cannot type input, it's like the thread is blocking the io.read; but when you define the function inside thread.create() it allows me to read and print perfectly fine. Is there a reason for this or is it a bug? my code: local event = require("event") local thread = require("thread") local modem = compone
  2. Did you ever find out? Because I'm trying to figure out the same thing
  3. I want to create a server that pulls the modem_message event and prints to the console, but I also want the computer to be able to send messages (based on io.read()) while waiting for a message. I tried using threads, but I think I am using them wrong. As far as I know there is no thread.sleep() so I'm not sure how to suspend a thread for a short period of time so that you can still type messages, but still have that thread automatically continue. How would I go about doing this?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.