- ComputerCraft | Programmable Computers for Minecraft
- → OczkoSX's Content
OczkoSX's Content
There have been 26 items by OczkoSX (Search limited from 10-February 22)
#180417 [MC 1.7.10 | CC 1.65] OpenCCSensors
Posted by
OczkoSX
on 24 May 2014 - 05:50 PM
in
Peripherals and Turtle Upgrades
Hi, im getting this error: http://pastebin.com/Bq9gbfxC
I'm using newest OpenCCSensors and ComputerCraft(1.63). On 1.57 version of CC i'm getting different crash log.
Can you help me?
I'm using newest OpenCCSensors and ComputerCraft(1.63). On 1.57 version of CC i'm getting different crash log.
Can you help me?
#176089 sending rednet commands
Posted by
OczkoSX
on 01 May 2014 - 01:57 PM
in
Ask a Pro
Maybe seperate programs on turtle? One program will receive rednet signals, second will digging and third will coming back. And in receive program you can do something like this:
id, msg = rednet.receive(10) shell.run(msg)and from computer you can send message "dig"
#176059 Check if variable exists and edit problems
Posted by
OczkoSX
on 01 May 2014 - 10:41 AM
in
Ask a Pro
Hi! I'm doing little spam on foum, sry for that 
How can I check if variable isnt nil ?
Here is my code: http://pastebin.com/07szXe0i
I'm saying about Tank() function.
I tried if variable == nil but it doesnt work
The second problem is terminating program
When i am in tank mode ($$tank show) and i terminate program, i cant edit it. It says: edit:60: attempt to call nil
I have to reboot PC then.
EDIT: I need checking var because i saw, when tank is empty, his liquid amount is nil, so table[1].amount is nil and program crashes
How can I check if variable isnt nil ?
Here is my code: http://pastebin.com/07szXe0i
I'm saying about Tank() function.
I tried if variable == nil but it doesnt work
The second problem is terminating program
When i am in tank mode ($$tank show) and i terminate program, i cant edit it. It says: edit:60: attempt to call nil
I have to reboot PC then.
EDIT: I need checking var because i saw, when tank is empty, his liquid amount is nil, so table[1].amount is nil and program crashes
#176055 OpenPeripherals - Railcraft Tanks API
Posted by
OczkoSX
on 01 May 2014 - 09:33 AM
in
Ask a Pro
Ah my bad. I just had to do something like this:
(code copied from other thread). I'm new on tables
local valve = peripheral.wrap("right")
local tableInfo = valve.getTanks("unknown")
for k, v in pairs(tableInfo) do
for x, y in pairs(v) do
print(x .. ": " .. y)
end
(code copied from other thread). I'm new on tables
#176054 OpenPeripherals - Railcraft Tanks API
Posted by
OczkoSX
on 01 May 2014 - 09:25 AM
in
Ask a Pro
Hi! How can i check all methods for rc's tanks ? I did p = peipheral.wrap("bottom"), p.listMethods(), but it just print listMethods(), getAdvancedMethodsData() and TankInfo(direction). When i use these methods it prints: table: <some signs here>
Can you help me?
Can you help me?
#175851 Events, Key & Char, can I have them at the same time?
Posted by
OczkoSX
on 29 April 2014 - 08:31 PM
in
Ask a Pro
I didn't understand you well, but i think you can make in loop something like this:
Up was first...
I don't know if you can compare char with enter sign. CometWolf's way is better then my D:
All events types you can check here: http://computercraft...ki/Os.pullEvent
while true do
char = os.pullEvent("char")
if char == '/n' then
-- ENTER
else
-- ADD CHAR TO STRING WHAT INCLUDE YOUR TEXT
end
Up was first...
I don't know if you can compare char with enter sign. CometWolf's way is better then my D:
All events types you can check here: http://computercraft...ki/Os.pullEvent
#175844 Touch Monitor Problem, If is always false...
Posted by
OczkoSX
on 29 April 2014 - 07:31 PM
in
Ask a Pro
Okay, thank you all. I split this program to my previous one. You can check it here: http://pastebin.com/fhjFnBWU
One monitor is showing general infos about reactor, second is a config monitor. I'm pretty sure you don't understand it but i hope it will help somebody
Please change thread title to: OczkoSX's Big Reactors troubles, and a ready Control Panel. Thanks fo all, See you
One monitor is showing general infos about reactor, second is a config monitor. I'm pretty sure you don't understand it but i hope it will help somebody
Please change thread title to: OczkoSX's Big Reactors troubles, and a ready Control Panel. Thanks fo all, See you
#175827 Touch Monitor Problem, If is always false...
Posted by
OczkoSX
on 29 April 2014 - 05:44 PM
in
Ask a Pro
CometWolf, on 29 April 2014 - 05:36 PM, said:
It's because your reaktor function dosen't yield. Essentially it needs to use coroutine.yield somewhere. The most common way is to add a sleep at the top of the loop. Also note that parallel functions do not run simoultaneously, like you seem to believe.
I know it doesn't. As you can see i add a while true do loop at the beginning of these functions
THX! It works
#175812 Touch Monitor Problem, If is always false...
Posted by
OczkoSX
on 29 April 2014 - 04:14 PM
in
Ask a Pro
Hi, it's me again
I've got lilttle problems with my code. I created some functions, one of them have to check monitor, draw text, and allow to change options, second have to apply settings to the reactor IN THE SAME TIME. And that is my problem. I add on the end of code line with parallel, but when i run a program it says: parallel :22: peripheral :62: Too long without yealding. Pls help!
- ComputerCraft | Programmable Computers for Minecraft
- → OczkoSX's Content


