api, rftools and computer craft

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

piecraxe

New Member
Jul 29, 2019
5
0
0
Hello,
In a first time, sorry if i do some mistakes, im french ^^.
I tried to display text using computercraft on a rftools screen. I use "in pairs" loop to list all methods next to a screen controller and i see: getScreenCoordonate, getScreenIndex and getScreenCount and more. When i call and print getScreencount, it works but when i try with other methods, it displays a java error. Do i need more arguments or is it a bug with opencomputer methods (compatibility ?) ?
I didnt find a website with rftools api, can you help me ?
Thanks,
Piecraxe
 
Last edited:

McJty

Over-Achiever
Mod Developer
May 13, 2014
2,015
2,519
228
twitter.com
Hello,
In a first time, sorry if i do some mistakes, im french ^^.
I tried to display text using computercraft on a rftools screen. I use "in pairs" loop to list all methods next to a screen controller and i see: getScreenCoordonate, getScreenIndex and getScreenCount and more. When i call and print getScreencount, it works but when i try with other methods, it displays a java error. Do i need more arguments or is it a bug with opencomputer methods (compatibility ?) ?
I didnt find a website with rftools api, can you help me ?
Thanks,
Piecraxe

What error did you get?
 

piecraxe

New Member
Jul 29, 2019
5
0
0
I have this error:
Java Exception Thrown :
java.lang.ArrayIndexOutOfBoundsException: 0

When i write:
print(peripheral.call("left", "getScreenCoordinate"))

I think i must have a 3rd arguments but i dont know which one...

And i dont know if i must use the "computer module" in the screen. (The error comes with and with no computer module in a screen).

Thanks,
Piecraxe
 

piecraxe

New Member
Jul 29, 2019
5
0
0
OK Thank you ;)
but how, Which syntax ? and with the tag of computer module ?
Thank you,
Piecraxe
 

piecraxe

New Member
Jul 29, 2019
5
0
0
to addText, i adapt with this video:
Its you ? :p

local sc = peripheral.wrap("left")
sc.addText("1" <== my tag , "hello", 0xff0000 <== i forgot the color )

i find for the coordinate but the number of the screen are not specified and i dont know how to separate x y and z
local sc = peripheral.wrap("left")
print(sc.getScreenCoordinate(0)) or 1,2,3...


But i dont know how it works with index...
I think you know because you develop it but i write it here for all ^^
 
Last edited: