When looping over the Settings API, only the last item of the loop is being shown, with no inputs

Question

Alright, so.
I am building a form with WordPress, (plugin) and want to loop over it as often as I want. I chose 10 to try it out.

So no inputs have been shown, even after I have the proper arguments. Still, nothing, all it showed me was "Item 10", which is the last time’s section title. So the loop seems to work, but it isn’t showing anything. And not every single one either!

it also showed me the description of the section. So I went and edited the section callback with the argument. And NOW I got some error message. It says "Notice: Undefined variable: amount in path/to/my-plugin/inc/Pages/Admin.php on line 106"

So, line 106 is where i made the callback for the section. (inside Class Admin)

        "callback" => function() { return $this->callbacks->listSection($amount ); },


That’s the call from this specific line.
And this here is what the function does: (inside Class AdminCallbacks)

  public function listSection( $amount ) { echo "Check out number: " .$amount;
}


So it has problems reading the variable.

The variable is set as an argument for the function inside the class Admin, inside this method.

  public function loopSettings( ) {
for ($i = 1;$i <= 10; $i++) {$this->setSettings( $i );$this->setSections( $i );$this->setFields( \$i );
}
}


I suspect the loop works since it shows me the number 10. But it doesn’t work on everything.
I do not know what else to provide for information, as this is a lot I assume.