#421
Posted 16 January 2013 - 04:35 AM
#422
Posted 16 January 2013 - 04:46 AM
Had a few requests for MFFS so I'll look into that soon
#423
Posted 16 January 2013 - 04:53 AM
m = peripheral.wrap("right")
function update()
local tab = sensor.call("right", "getTargetDetails", "2,0,0")
return tab.stored
end
graphI = graph.new(m, update, "EU Storage", nil, 0, 1000000)
while true do
graphI:draw()
sleep(0.5)
end
I keep getting an error at line four saying "attempt to index ? (a nil value)"
#424
Posted 16 January 2013 - 04:59 AM
Edit: It's likely to be "Stored" (uppercase), too. I think all/most properties return ProperCase properties at the moment
#425
Posted 16 January 2013 - 05:01 AM
Mikeemoo, on 16 January 2013 - 04:59 AM, said:
Edit: It's likely to be "Stored" (uppercase), too. I think all/most properties return ProperCase properties at the moment
Tried it with tab.Stored as well. Same error.
#426
Posted 16 January 2013 - 06:25 AM
#427
Posted 16 January 2013 - 06:37 AM
jewelshisen, on 16 January 2013 - 04:53 AM, said:
m = peripheral.wrap("right")
function update()
local tab = sensor.call("right", "getTargetDetails", "2,0,0")
return tab.stored
end
graphI = graph.new(m, update, "EU Storage", nil, 0, 1000000)
while true do
graphI:draw()
sleep(0.5)
end
I keep getting an error at line four saying "attempt to index ? (a nil value)"
Please prepend the following lines and re-test from a freshly booted computer:
os.loadAPI("ocs/apis/sensor")
os.loadAPI("ocs/apis/graph")
#428
Posted 16 January 2013 - 06:55 AM
jocan2003, on 16 January 2013 - 06:25 AM, said:
0.1 is the latest official release. (The ones before that were 0.0.1, 0.0.2, 0.0.4..etc..)
Go with the one from the first page
#429
Posted 16 January 2013 - 07:09 AM
Lyqyd, on 16 January 2013 - 06:37 AM, said:
jewelshisen, on 16 January 2013 - 04:53 AM, said:
m = peripheral.wrap("right")
function update()
local tab = sensor.call("right", "getTargetDetails", "2,0,0")
return tab.stored
end
graphI = graph.new(m, update, "EU Storage", nil, 0, 1000000)
while true do
graphI:draw()
sleep(0.5)
end
I keep getting an error at line four saying "attempt to index ? (a nil value)"
Please prepend the following lines and re-test from a freshly booted computer:
os.loadAPI("ocs/apis/sensor")
os.loadAPI("ocs/apis/graph")
Nope... Still the same error.
#430
Posted 16 January 2013 - 07:15 AM
jewelshisen, on 16 January 2013 - 07:09 AM, said:
Lyqyd, on 16 January 2013 - 06:37 AM, said:
jewelshisen, on 16 January 2013 - 04:53 AM, said:
m = peripheral.wrap("right")
function update()
local tab = sensor.call("right", "getTargetDetails", "2,0,0")
return tab.stored
end
graphI = graph.new(m, update, "EU Storage", nil, 0, 1000000)
while true do
graphI:draw()
sleep(0.5)
end
I keep getting an error at line four saying "attempt to index ? (a nil value)"
Please prepend the following lines and re-test from a freshly booted computer:
os.loadAPI("ocs/apis/sensor")
os.loadAPI("ocs/apis/graph")
Nope... Still the same error.
Your code is using the right side for both monitor and sensor, upon closer examination. This is almost certainly the source of the issue.
#431
Posted 16 January 2013 - 07:17 AM
jewelshisen, on 16 January 2013 - 07:09 AM, said:
Lyqyd, on 16 January 2013 - 06:37 AM, said:
jewelshisen, on 16 January 2013 - 04:53 AM, said:
m = peripheral.wrap("right")
function update()
local tab = sensor.call("right", "getTargetDetails", "2,0,0")
return tab.stored
end
graphI = graph.new(m, update, "EU Storage", nil, 0, 1000000)
while true do
graphI:draw()
sleep(0.5)
end
I keep getting an error at line four saying "attempt to index ? (a nil value)"
Please prepend the following lines and re-test from a freshly booted computer:
os.loadAPI("ocs/apis/sensor")
os.loadAPI("ocs/apis/graph")
Nope... Still the same error.
It looks like your using "right" for both the monitor and the sensor.
I've just done a test and this is working correctly for me:
os.loadAPI("ocs/apis/sensor")
os.loadAPI("ocs/apis/graph")
m = peripheral.wrap("top")
function update()
local tab = sensor.call("right", "getTargetDetails", "2,0,0")
return tab.Stored
end
graphI = graph.new(m, update, "EU Storage", nil, 0, 1000000)
while true do
graphI:draw()
sleep(0.5)
end
Lyqyd, on 16 January 2013 - 07:15 AM, said:
Dammit you won
#434
Posted 16 January 2013 - 08:53 AM
#435
Posted 16 January 2013 - 08:56 AM
Mikeemoo, on 16 January 2013 - 06:55 AM, said:
jocan2003, on 16 January 2013 - 06:25 AM, said:
0.1 is the latest official release. (The ones before that were 0.0.1, 0.0.2, 0.0.4..etc..)
Go with the one from the first page
#436
Posted 16 January 2013 - 09:30 AM
E.g. "BatBox" instead of "0,2,0"?
#437
Posted 16 January 2013 - 09:41 AM
Lordmau5, on 16 January 2013 - 09:30 AM, said:
E.g. "BatBox" instead of "0,2,0"?
The target keys that come back are the relative coordinates, not the name of the entity. It's impossible for you, the user, to label a batbox with a unique name, so the target key has to be something we KNOW will always be unique, in this case, the coordinate.
If you need to get the type of entity at that position, you can get detailed information for the target which will tell you it's a batbox.
#438
Posted 16 January 2013 - 11:07 AM
Just to scare you...
(Yes, 99% broken in my own fork at the moment. Gradually putting it back together)
I've added a few things:
1) Completely decoupled the 'Sensing' from both cards and the sensor peripheral. You can now very easily just 'use the sensors' without it being tied into the whole system. This means we can very easily add new peripherals that use the sensing ability. A "sensor" class is now just there to retrieve information and return targets - a "sensor interface" now bridges the gap between sensor cards and sensors.
2) Made a system for dealing with the whole "method call on next tick" system. As you can see here: https://github.com/m...ntityGauge.java adding a new method is done in a nice little callback.
3) Added better error handling throughout. If any of the methods throw an Exception the method calling queue thing handles it and returns it back to the lua as an ocs_error event along with the error message. (I've modified the lua to deal with this)
4) I've prepared the system to be able to handle sensor upgrades, although I havent gone as far as implementing these yet
5) General tidying up. The code base was getting a little bit spaghetti, so it's much cleaner now. I think I've made a few classes completely redundant too so I'll delete them as part of this process.
#439
Posted 16 January 2013 - 01:06 PM
#440
Posted 16 January 2013 - 08:38 PM
jewelshisen, on 16 January 2013 - 01:06 PM, said:
For the time being, if this card upgrade stuff goes ahead, the ability to change range by using different cards should be enough.. I'm nervous about having them configurable because I know people will just set it really high then produce a load of bug reports when it starts to become slow!
However, I know other mods do have that kinda thing configurable (such as nuclear explosion strength in ic2), so configurable ranges is a possibility, but I'll leave that decision to Cloudy..
For the time being it's not something I'll be focusing on. Plenty of other stuff to do
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











