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

coolian

Members
  • Content Count

    9
  • Joined

  • Last visited

Posts posted by coolian

  1. From this comment

    I would assume that somewhere on the internet there exists such a thing as a "big letter api" but i cannot find any

    Does anyone know where to find such a library?

  2. I once ran into this exact problem, OC by default disables localhost specifically with this default config

    blacklist=[
          "127.0.0.0/8",
          "10.0.0.0/8",
          "192.168.0.0/16",
          "172.16.0.0/12"
    ]

    the config supports domain names op addresses in string format and even CIDR notation for easy address ranges.

    the reason for this is apparently to prevent user from hosting their game locally and accidentally letting other people access their computers through OC.

    If you arent in multiplayer its probably safe to remove this from the config and othherwise you'll have to get some other machine to host your web server on for example a raspberry pi works just fine for this sort of application.

  3. how do i check that stdin exists?

    at the moment i try to do it like so

    if io.stdin ~= nil then
    	-- read stdin
    end

    however i get the error "attempt to index a nil value (field 'stdin')"

    how is this even possible if im checking if it is nil?

    i am using this in an attempt to recreate the 'tee' tool from linux

  4. i have made some code to play around with the modem stuff but for some reason the modem_message event always returns 0 also im am running one of the scripts on a microcontroller and i am running minecraft version 1.7.10

    code of the microcontroller:

    local rs = component.proxy(component.list("redstone")())

    local modem = component.proxy(component.list(modem)())

    local identity = 1

     

    a ={}

    d = "id:"

    f = tostring(identity)

    a[1] = d

    a[2] = f

    modem.broadcast(1234, "id:1 is online")

    while true do

      computer.pullSignal(0.5)

    end

     

    code of the not microcontroller:

    local component = require('component')

    local event = require('event')

    local modem = component.modem

     

    modem.open(1234)

    while true do

      local _, _, from, port, message = event.pull("modem_message")

      print(message)

      os.sleep(0.1)

    end

     

    obviously both are connected with wires and the file with the modem.open is executed befor starting the microcontroller

×
×
  • Create New...

Important Information

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