Jump to content




[MC 1.2.5] - [CC 1.33] ccSensors [SMP/SSP]

peripheral java lua

454 replies to this topic

#381 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 18 September 2012 - 09:30 AM

I would like to thank you sir for this most incredible addon. it allows for the best secret passageways / defence systems ever. you have changed my base forever

#382 Marval

  • Members
  • 47 posts

Posted 18 September 2012 - 09:35 AM

Hi, in SensorData are information about this what i can read from each sensor but there nothing about Inventory sensor. I already know that I can write

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 Ceredorac

  • New Members
  • 2 posts

Posted 18 September 2012 - 11:03 AM

Whenever I try to run version 017pr2 of this addon on my server with MystCraft v0.8.6b I get this error:


[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 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 18 September 2012 - 11:18 AM

That is obviously not the full error. Please post more.

#385 Marval

  • Members
  • 47 posts

Posted 18 September 2012 - 01:38 PM

I got this error when tried to open sensor's GUI


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 Catnic

  • New Members
  • 1 posts

Posted 18 September 2012 - 10:10 PM

Hello everyone,

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 Doc_O_Love

  • Members
  • 5 posts

Posted 19 September 2012 - 07:35 PM

Hello,
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 AKman1984

  • Members
  • 33 posts

Posted 20 September 2012 - 02:46 AM

Hey any one can help me

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.

#389 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 20 September 2012 - 08:08 PM

View PostAKman1984, on 20 September 2012 - 02:46 AM, said:

I don't know if it's a bug or anything but I am running Technic


#390 Ivegon

  • New Members
  • 4 posts

Posted 22 September 2012 - 12:05 AM

I`ve been trying to integrate CCSensors into my nuclear power plant`s monitor program. But, I`m finding it hard to use. I`m not fluent in lua so I only know some amount of rudimentary coding. I understand that there`s a good number of tutorials online. Including the video made by FunshineX(AKA rondouglas). But, I`m having trouble comprenhending how to code using CCSensor. I`ve studied the different included APIs (SensorsAPI, SensorsUI) as well as different codes I`ve found online and that`s included (dash_reactor (Which for some reason doesn't want to work in the latest Technic version) and a code called Iron Noval Control System (link). And, with no avail. Thus, I would like to ask for help. I can provide my preliminary code for my monitor program. It`s nothing special.
Spoiler

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 treve01

  • New Members
  • 1 posts

Posted 24 September 2012 - 10:15 PM

is this mod still getting support? its very buggy here, and i really need it.
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 audiogarden21

  • New Members
  • 1 posts

Posted 25 September 2012 - 10:46 AM

I think I've isolated the reason why /ccSensors/dash_bcengine command doesn't function properly.

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 CoolisTheName007

  • Members
  • 304 posts

Posted 29 September 2012 - 03:42 PM

Removed by the author.

#394 n1ghtk1ng

  • Members
  • 58 posts

Posted 29 September 2012 - 07:54 PM

I installed ccSensors and now every time I launch my world it gives me this error:
Spoiler


#395 liko2k

  • New Members
  • 9 posts

Posted 04 October 2012 - 04:14 PM

Wee need another update...it is MC 1.3.2 era now...While CC is already there, sensors aren't and we miss great add-on this way...

#396 wackozacko

  • New Members
  • 6 posts

Posted 05 October 2012 - 01:27 AM

I'm pretty sure I found a bug with this mod. At least with version mc125 build 017pr1 which is in the current build of Technic SMP. I've been browsing google for the last couple of hours trying to find a solution, but I haven't come across anything helpful.

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 Ange1ofD4rkness

  • New Members
  • 12 posts
  • LocationColorado

Posted 10 October 2012 - 03:38 AM

Dang it I was just about to finish my nuclear reactor ... then this? Ahhh! It's never going to be complete at this rate LOL

#398 ironsmith123

  • New Members
  • 69 posts

Posted 15 October 2012 - 03:54 AM

Okay, I am having an issue. When I go to put my AdvancedPowerSystemsSensor Module into the sensor, I can't seem to put it in. I drag it to the slot and I click to make it go in, but it refuses to go in.I can get the transmitter card to go in fine, but the module card just wont go in. Any reason for this, am I doing something wrong?

#399 matejdro

  • Members
  • 324 posts

Posted 21 October 2012 - 08:10 AM

Is anybody working on that or is officially dead?

#400 skrypt

  • New Members
  • 7 posts

Posted 24 October 2012 - 06:28 AM

Um. How do you make the transmitter card? The recipes on the 1st post arent matching what is in the game.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users