- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
coolian
-
Content Count
9 -
Joined
-
Last visited
Posts posted by coolian
-
-
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?
-
because i refuse to oblige by your request
-
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.
-
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
-
12 hours ago, Molinko said:
The issue is with your variables returned by event.pull. the 6th rturn value is the message. You're assignment for message is the fifth which is actually distance which will always be 1 from a wired modem.
thanks now it works after adding _ befor message
-
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
-
47 minutes ago, payonel said:
functions have to have an `end`
local event = require("timer") event.timer(2, function() print("do something") end,3)
thx im not very good at lua usally im in java but open computers dosnt has a java implementation
-
i want to make a timer call some function after a little bit of time i use event.timer
local event = require'timer' event.timer(2,function() print("do something"),3)
that is my code and i get an unexpectet symbol error at ')' wheres the unexpectet symbol how do i need to make that
Big Letter api?
in Programming
Posted
its not the best but its not the worst either. good enough