This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
piano1997's profile picture

Help with blood magic

Started by piano1997, 03 September 2015 - 07:40 AM
piano1997 #1
Posted 03 September 2015 - 09:40 AM
I'm trying to automate the blood altar from blood magic . One of the functions returns this array


{
  {
    capacity = 10000
    contents = {
		 rawName = "Life Esssence",
		 amount = 0,
		 name = "life essence",
		 id = 156,
    },
  },
}

I wanted to print the amount of the life essence can someone help me ????
Konlab #2
Posted 03 September 2015 - 04:48 PM

local amount = tbl[1].contents.amount --# tbl is the table. I'm indexing it to get the sub-table
Edited on 03 September 2015 - 02:48 PM