[MC 1.2.5] - [CC 1.33] ccSensors [SMP/SSP]
#381
Posted 18 September 2012 - 09:30 AM
#382
Posted 18 September 2012 - 09:35 AM
local targets = sensors.getAvailableTargetsforProbe("right","Chest","InventoryInfo")
local data = sensors.getSensorReadingAsDict("right","Chest",targets[1],"InventoryInfo");
monitorapi.printM("left",data.TotalItems)
and this give mi Total amount of items but what i must type when I want for example get Number of slot and amount of items in this slot? Something like this:
Slot 1 - 40 items
Slot 2 - 30 items
I know that when I type:
local data = sensors.getSensorReadingAsDict("right","Chest",targets[1],"InventoryContent");
monitorapi.printM("left",data[0])
it give me information about items in first slot but all information, what i must add to get only amount of items?
#383
Posted 18 September 2012 - 11:03 AM
[SEVERE] Unexpected exception
java.lang.StackOverflowError
at java.util.Hashtable.get(Unknown Source)
at forge.DimensionManager.getWorld(DimensionManager.java:53)
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:741)
at net.minecraft.server.MinecraftServer.initDimension(MinecraftServer.java:689)
it then keeps repeating the
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:741)
at net.minecraft.server.MinecraftServer.initDimension(MinecraftServer.java:689)
Edited by Ceredorac, 18 September 2012 - 11:25 AM.
#384
Posted 18 September 2012 - 11:18 AM
#385
Posted 18 September 2012 - 01:38 PM
java.lang.NullPointerException
at ccSensors.client.GuiSensorsBase.d(GuiSensorsBase.java:128)
at gb.a(GuiContainer.java:131)
at ccSensors.client.GuiSensorsBase.a(GuiSensorsBase.java:98)
at lr.b(EntityRenderer.java:1125)
at net.minecraft.client.Minecraft.x(Minecraft.java:876)
at net.minecraft.client.Minecraft.run(Minecraft.java:753)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 553cee4d ----------
When i tried to destroy sensor, place in different place - it work fine, now when i back to place near arboretum and logger (Forestry mod) i got this:
java.lang.ClassCastException: vd cannot be cast to ccSensors.shared.ItemComputerSensorCard
at ccSensors.shared.TileEntityComputerSensor.updateActiveSensor(TileEntityComputerSensor.java:254)
at ccSensors.shared.TileEntityComputerSensor.a(TileEntityComputerSensor.java:329)
at forestry.cultivation.planters.Planter.dumpToInventory(Planter.java:709)
at forestry.cultivation.planters.Planter.dumpStash(Planter.java:661)
at forestry.cultivation.planters.Planter.doWork(Planter.java:368)
at forestry.core.gadgets.TileMachine.doWork(TileMachine.java:291)
at buildcraft.api.PowerProvider.update(PowerProvider.java:54)
at forestry.core.gadgets.TileForestry.n_(TileForestry.java:60)
at forestry.core.gadgets.TileMachine.n_(TileMachine.java:167)
at xd.n(World.java:2081)
at net.minecraft.client.Minecraft.k(Minecraft.java:1871)
at net.minecraft.client.Minecraft.x(Minecraft.java:825)
at net.minecraft.client.Minecraft.run(Minecraft.java:753)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT c60468ec ----------
Ok found a problem. Arboretum automatically send sand to attach pipe or inventory, when you place sensor next to arboretum, it send sand to sensor module card slot and crash.
#386
Posted 18 September 2012 - 10:10 PM
I've recently started playing Minecraft (I thought it was just playing with blocks ;D) I discovered Tekkit and with it Computercraft which I love. I upgraded CC to the latest version on my own Tekkit server and was going to try ccSensors.
First attempt failed because the block ID's where wrong and when that was sorted I can across another issue which I hope you can help me with.
When I place a sensor block and sensor it shows the owner (I think that was it) as: NULL. The option to change that is grayed out.
I use Tekkit v3.1.2 with the "normal" versions of the mods except for CC which I upgraded to the latest version.
Could you please point me in the right direction to get the sensors working?
#387
Posted 19 September 2012 - 07:35 PM
I am having a problem using the inventory sensor; several of the items in my chests are showing up with Null as the name on the server I play on. Now vanilla blocks, and some mod items have their name or something I can use to reference. But the ones that come up like this “64xNULL@2” or “49xNull@0” I cannot sort or track, because several items have null as their name with the same damage values.
Is there a way to return the item number instead of the name, and let me do the cross referencing?
Thank you,
The Doc.
#388
Posted 20 September 2012 - 02:46 AM
Sorry if this was asked in the past I did a search and did not find anything.
I don't know if it's a bug or anything but I am running Technic and im having issues with the proximity Sensor Module. When I look at the module on an active Sensor it runs fine not problems. I can see all the information on the Sensor but when I look at if on a computer running ccSensors console it shows me no information. The only info I can see is the targetInfo but the livingEntities, players, and animals don't give me any info. When hit getReading it just does not display anything and on some targets it seems that it quits the program. Any one know how to fix this? I have try this in tekkit also same issue.
#390
Posted 22 September 2012 - 12:05 AM
I'm planning for the program to work using if statements. And, each second it refreshes by going through the program again.
Though, again, please be warned that I'm not a very experienced coder. Thus, please excuse me if any method is archaic or inefficient.
Also, for a bit more perspective on what I'm trying to do, I've posted what my nuclear power plant is on another forum, essentially. It's a pretty big project that I've been working on from time to time for a few weeks now.(link)
Also, here's a picture of the control room: link
*EDIT* I put in the latest version of the code. Decided to optimize it a bit to make it easier to code with.
#391
Posted 24 September 2012 - 10:15 PM
it sort of crashed when i try to get readings from probe.
i can select sensors (had to dump tekkit for this mod to get more sensors working)
#392
Posted 25 September 2012 - 10:46 AM
To get it functioning, I had to comment out all but the heat, energy, and stage readings, as seen here:
http://www.mediafire...490vtdcjznj86o8
This is what it looked like normally when I first started messing around with that command:
http://www.mediafire...rxs0rj0utk4vdix
There seems to be an error in the SensorModule for BC that displays the values for the commented sections ahead of the labels, causing the code to report the 282 error which corresponds to the calculation of the current and max values, as seen here:
http://www.mediafire...ewul1a5sfyvgv1f
For a comparison, I have the readings for a Steam Engine here:
http://www.mediafire...606zziht6ce2zo2
This is what it looks like when you comment out the readings that have their values ahead of their labels:
http://www.mediafire...w0los3br25xi0u4
As you can see, there are no errors, and it updates in real time as it was coded to, which is great. I've had a hell of a time trying to find where the error in the reporting is stemming from, so that's why I'm here now, in hopes that we can figure this out together. I'm no expert mind you, but I have written some basic programs in C++ for an Everquest Emulator server, so I know a little bit, but I could really use some help here.
Oh, and another thing. If you change the name of a sensor it will also break the code. The only name that will work is "Sensor".
Dashboards can be extremely useful to the community in setting up control rooms for power stations and it would be a shame to not have this lovely piece of functionality.
#393
Posted 29 September 2012 - 03:42 PM
#394
Posted 29 September 2012 - 07:54 PM
#395
Posted 04 October 2012 - 04:14 PM
#396
Posted 05 October 2012 - 01:27 AM
The error is with function call getSensorReadingAsDict on LargeChests.
The code I have is as follows
os.unloadAPI("sensors") os.loadAPI("/rom/apis/sensors") side = sensors.getController() sens = sensors.getSensors(side) INV1 = sens[1] targets = sensors.getAvailableTargetsforProbe("top",INV1,"InventoryContent") data = sensors.getSensorReadingAsDict("top",INV2,targets[1],"InventoryContent")
Which gives me this server output
02:18:23 [INFO] [mod_ccSensors] callMethod:3 args[0]: 02:18:23 [INFO] [mod_ccSensors] callMethod:5 args[2]: 02:18:23 [INFO] [mod_ccSensors] callMethod:6 args[2]: 02:18:23 [INFO] null 02:18:23 [SEVERE] java.lang.NullPointerException 02:18:23 [SEVERE] at ccSensors.shared.SensorTarget.getTargetType(SensorTar get.java:206) 02:18:23 [SEVERE] at ccSensors.shared.sensorModules.BaseSensor.setTarget(B aseSensor.java:399) 02:18:23 [SEVERE] at ccSensors.shared.TileEntityComputerSensor.setTarget(T ileEntityComputerSensor.java:82) 02:18:23 [SEVERE] at ccSensors.shared.TileEntitySensorController.setTarget (TileEntitySensorController.java:465) 02:18:23 [SEVERE] at ccSensors.shared.TileEntitySensorController.callMetho d(TileEntitySensorController.java:673) 02:18:23 [SEVERE] at dan200.computer.core.Computer$PeripheralWrapper.call( Computer.java:128) 02:18:23 [SEVERE] at dan200.computer.core.Computer$46.invoke(Computer.java :1435) 02:18:23 [SEVERE] at org.luaj.vm2.lib.VarArgFunction.onInvoke(Unknown Sour ce) 02:18:23 [SEVERE] at org.luaj.vm2.TailcallVarargs.eval(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.TailcallVarargs.arg1(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.call(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.execute(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.invoke(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.execute(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.invoke(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.execute(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.invoke(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.lib.BaseLib.pcall(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.lib.BaseLib$BaseLibV.invoke(Unknown Sour ce) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.execute(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.invoke(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.execute(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.invoke(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.execute(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.invoke(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.execute(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.invoke(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.lib.BaseLib.pcall(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.lib.BaseLib$BaseLibV.invoke(Unknown Sour ce) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.execute(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.call(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.execute(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaClosure.invoke(Unknown Source) 02:18:23 [SEVERE] at org.luaj.vm2.LuaThread$State.run(Unknown Source) 02:18:23 [SEVERE] at java.lang.Thread.run(Unknown Source) 02:18:23 [INFO] [mod_ccSensors] callMethod:9 args[2]: 02:18:23 [INFO] [mod_ccSensors] callMethod:2 args[1]:and the program simple quits in the CC terminal.
If I use targets[2] instead, which is a SortingMachine rather than a LargeChest I get the following
02:13:27 [INFO] [mod_ccSensors] callMethod:3 args[0]: 02:13:27 [INFO] [mod_ccSensors] callMethod:5 args[2]: 02:13:27 [INFO] [mod_ccSensors] callMethod:6 args[2]: 02:13:27 [INFO] [SETTARGET] TileSorter 02:13:27 [INFO] [mod_ccSensors] callMethod:9 args[2]: 02:13:27 [INFO] [mod_ccSensors] callMethod:2 args[1]:And useful output in the CC terminal telling me what is actually in the chest.
If anyone knows a way to deal with this it'd be really helpful (I don't want to have to upgrade every chest in my sorting system) or if this is a known bug, when do you think it will be fixed?
#397
Posted 10 October 2012 - 03:38 AM
#398
Posted 15 October 2012 - 03:54 AM
#399
Posted 21 October 2012 - 08:10 AM
#400
Posted 24 October 2012 - 06:28 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users