Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

ajh657

Members
  • Content Count

    3
  • Joined

  • Last visited

Posts posted by ajh657

  1. 2 minutes ago, Molinko said:

    oh but it did work. rs.getItems() returns a list(table). I assume you have 505 of something in your storage... The list returned has data(as a table) in each index. Look at it like this...

    
    local function dumpSlot(n, items)
    	local info = items[ n ]
    	for k, v in pairs( info ) do
    		print( k, v )
    	end
    end
    
    -- look at details of slot 1 in list of items returned by rs.getItems()
    dumpSlot(1, rs.getItems())

     

    yes it worked thanks :)

  2. 25 minutes ago, Molinko said:

    The table is being turned into a string. Lua doesn't know how to do this in a meaningful way by default. What you want are the table keys and its values. Try this out and see if its what you're looking for.

    for k, v in pairs(test) do

      print( k, tostring(v) )

    end

    Sorry for the crap formatting. Phone...

    this is the result i don't think it worked

    here's the resultScreenshot_26.png

     

  3. I have tried to make a program that uses Open Computers Refined Storage Driver mods command getItems(). But when im trying to print test when Local is test = rs.getItems. But then it returns "table: 0x41c2700" what im doing wrong

    Here is the code:2017-02-11_18.13.40.png

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.