PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

43M Downloads

Drone Variable Integration w/ OpenComputers

SirR3AL opened this issue ยท 3 comments

commented

Minecraft Version: 1.7.10

Forge Version: 7.10.99.99

Mod Version: 1.7.10-1.12.7-152

Describe your problem, including steps to reproduce it:

Hello so I am trying to program Drones with OpenComputers and I wanted to be able to set and get local and global variables for the Drone using the .setVariable() and .getVariable() methods. But I am having a hard time in finding out how to actually retieve the varaibles (Global and Local) from the drones. I guess if was looking for an explanation on how to use the two methods properly and if there is any additional setup required for the drone. Here is my test program below, Drone Program, and the error I recieve when I run it:

OpenComputers Program:
2018-05-23_11 46 56

Drone Program:
2018-05-23_11 46 43

Result Output:
2018-05-23_11 47 06

Any other comments:

P.S. - I made a global variable prior named "Test" for the sake of the test program using the /setGlobalVariable command

commented

I changed the requested variable as you said to be entered as a string and it gave me the requested results, thanks alot!

commented

I have to admit I'm not really familiar with OpenComputers (and I haven't heavily tested CC/OC integration since porting), but should drone.getVariable(#Test) read drone.getVariable("#Test") ?

Probably time for me to learn some OpenComputers...

commented

Excellent, closing now.