ComputerCraft Forums

ComputerCraft => Ask a Pro => Topic started by: zonk1987 on May 07, 2023, 05:25 PM

Title: Refined Storage is crashing
Post by: zonk1987 on May 07, 2023, 05:25 PM
Hey i have a problem with this code:

local bridge = peripheral.find("rsBridge")
 
if bridge == nil then
  print("RS Bridge not found.")
  return
end
 
local chest = peripheral.find("enderstorage:ender_chest")
 
if chest == nil then
  print("Chest not found.")
  return
end
 
local items = bridge.listItems()
 
for _, item in ipairs(items) do
  local itemInfo = bridge.getItem(item)
  if itemInfo.nbt ~= nil and (itemInfo.nbt.Enchantments ~= nil or itemInfo.nbt.affix_data ~= nil or itemInfo.nbt.gem ~= nil) then
    print("Analyzing " .. itemInfo.displayName)
    local count = bridge.exportItemToPeripheral(item, peripheral.getName(chest))
    if count > 0 then
      print("Exported " .. count .. " x " .. itemInfo.displayName .. " to " .. peripheral.getName(chest))
    end
  end
end

Everytime i run this code i need to break my Refined Storage Controller because i can't get any Item manually from any Grid and Items that got imported into the Refined Storage System doesn't Stack anymore.

Can someone help me and sorry for my bad english i really try :)

Best regards
zonk1987
Title: Refined Storage is crashing
Post by: Lupus590 on May 09, 2023, 07:54 AM
I'm not familiar with the rsbridge peripheral, but I think you are running into a bug. Your code seems fine to me. I would get in contact with the author of the peripheral mod that is adding the rsbridge and let them know what is happening.
Title: Refined Storage is crashing
Post by: zonk1987 on May 09, 2023, 01:14 PM
THx for the advice he fixed it immediately.