Refined Storage is crashing

Started by zonk1987, May 07, 2023, 05:25 PM

Previous topic - Next topic

zonk1987

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

Lupus590

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.

zonk1987

THx for the advice he fixed it immediately.