Advertisement
MagmaLP

test

Nov 10th, 2023 (edited)
889
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. os.loadAPI("ocs/apis/sensor")
  2. local sen = sensor.wrap("bottom")
  3.  
  4. -- Funktion zum Anzeigen der Informationen über ein Ziel
  5. local function printTargetInfo(targetName, targetInfo)
  6.     print("Zielname: " .. targetName)
  7.     print("Zielinformation: " .. textutils.serialize(targetInfo))
  8.     print("--------------------------")
  9. end
  10.  
  11. -- Schleife durch alle gefundenen Ziele
  12. for targetName, targetInfo in pairs(sen.getTargets()) do
  13.     if targetName == "MagmaLP" then
  14.         printTargetInfo(targetName, targetInfo)
  15.     end
  16. end
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement