I have lots of loops where I want to do the same task several times but not iterate through a data set. For example to spawn x amount of something, I do:
var amount
for i in range(amount):
var scene = packedScene.instance()
add_child(scene)
I do this quite often. Now, this leaves me with many warnings saying "Local variable i is declared but never used". My warnings are stacking up are getting cluttered with these warnings I can't really do anything about.
What would be the best way to avoid this? Would love for gdscript to have something like:
var amount
do amount times:
add_child(scene)