Closed Geird closed 3 years ago
Function getCardData() is correct but it returns java array instead of string. Seems that CC:Tweaked cannot handle arrays. It works it in lua console but not in lua program.
Console
lua lua> x=peripheral.wrap('right') lua> x.getCardData() "0" "Off" "10 000" "8 500" "0" "0:00:00" lua>
Program local x=peripheral.wrap('right') print(x.getCardData()) Result 0 Off 10 000 8 500 0 0:00:00
Program2 local x=peripheral.wrap('right') print(type(x.getCardData())) Result string <- here it should be not string
I can add a parameter and return result in different formats (array, json, plain text, etc.)
Fixed in EnergyControl-1.12.2-0.1.9.jar
Version: EnergyControl-1.12.2-0.1.8
What happened: After trying to multiple times, I can't seem to find a way to read any data beyond the first slot of an information panel. Based on the documentation I expected getCardData() to return "Reactor Status","100","10 000","8 500","0","5:30:18" but it just seems to return "Reactor Status".
Setup / example below.
Full mod list, if that's useful.
modlist.txt