Now I'll have to preface this by saying, it has been a while since I written in GDScript.
But you do not have start defining functions by using Def, but all you have to do is use func name():
Here's an example of how functions are used in Godot
Besides this, I would recommend placing var at the top of your code.
Also, what is the idea here? Because it seems like you're trying to do an array.