ComputerCraft Forums

ComputerCraft => Ask a Pro => Topic started by: CreativePlayer on Dec 08, 2019, 01:20 AM

Title: Problems with Methods
Post by: CreativePlayer on Dec 08, 2019, 01:20 AM
Hello guys,

actually I try to code a programm in computercraft in Minecraft version 1.12.2.. The programm shoult read informations from a  peripheral from a different mod (Industialcraft 2). I want to use methods to read the stored energy level e.g. When I try to print a method on the terminal, it says:

function: <some numbers>

Is there a way to print a normal string on the Terminal? So I need to translate the strange Output to an readable text.

Thanks for any help

Title: Problems with Methods
Post by: Lupus590 on Dec 08, 2019, 02:01 AM
you probably want to invoke the methods which you can do by adding ()'s after the function name

-- instead of this
peripheral.method

-- do this
peripheral.method()

Title: Problems with Methods
Post by: CreativePlayer on Dec 08, 2019, 11:59 AM
Thanks for the fast reply.
I will try this...
Title: Problems with Methods
Post by: CreativePlayer on Dec 08, 2019, 01:53 PM
Alright is worked.
Thank you for helping me.