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

ackley14

Members
  • Content Count

    6
  • Joined

  • Last visited

Posts posted by ackley14

  1. So i'm working on a rudimentary network system to transmit simple packets of information between computers, ya know a basic network. I've run into the issue however, that its quite simply not working how i'm expecting it too. I've had no problem with OC in the past making several useful tools, but apparently i can't crack wireless networks

     

    So here's the current testing environment:

     

    Two computers about 5 blocks apart.

    one is in the lua shell with a simple =event.pull("modem_message")

    Port 52 is open

    The other is broadcasting "test" on 52

    nothing is happening on the first computer!

     

    I'm getting no errors either. and when doing =modem.broadcast(52,"test") it returns true stating that the message was successfully sent. It's just not being recieved for some reason.

     

    What could be causing this!!?! D:

     

    EDIT: for reference i'm in 1.10.2 and i'm using two addons: Computronics and OCRSDrivers (for refined storage monitoring) both of these are natively supported in 1.11 but not in 1.10 so i have to use the external mods. would they possibly be interfereing?

     

    EDIT2: somewhat solved i guess. restarted my client and things seemed to be working all of a sudden. Also mistakenly put event.listen in the title instead of event.pull. my bad!

  2. 5 hours ago, Gorzoid said:

    Assuming you are require'ing the io and fs table, your only problem is that you need to put the w/r inside quotes, like "w"

    OH....i'm dumb....thankya. forgot that it defaults to r if no w/a is present and...without quotes..its not v.v. thanks kind stranger! ;_;

  3. So i'm working on a super simple logs library to make outputting errors/messages to a log alot simpler in a different program i'm working on. The issue is that i am completely unable to find a way to create a new file inside of code!

     

    I remember in computercraft it was simply trying to open a file that didn't exist yet, would create a new one. but for some reason, it's not doing it in this instance.

     

    my code is roughly:

    local fname = "output.txt"
    local file, err = io.open(fs.concat(shell.getWorkingDirectory(),"/logs/",fname),w)--i've tried both w and a

    at this point i'm really not sure what i'm doing wrong! is there a specific function to create a new file? make directory only lets you create folders from what my experiences/documentation has said.

  4. Keyboard.isKeyDown(keyboard.keys.space) and other variants are always returning nil and i'm not sure why!

     

    here's my code

    keyboard = require("keyboard")
    while true do
       print(keyboard.isKeyDown(keyboard.keys.space))
    end

    this returns nil over and over. no amount of button pressing changes the output for whatever reason

    any ideas why?

  5. So I'm writing a program designed to be used by everybody on the server. the problem is that i don't want random people messing with the computer. I want to lock it to only run that one program. In this case, i'm using OC to control a teleporter (by telling a robot to grab a specific item from a chest, put it in the teleporter and send a redstone signal. fairly simple stuff. either way, is there a good way to prevent interrupts from the user? either by force-restarting the computer on interrupt or just catching it all together?

×
×
  • Create New...

Important Information

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