Vielen Dank Leute,

nachdem ich do und loop entfernt hab funktioniert das Ganze jetzt.