Problem with Instantiate GameObject in loop

Please use Code Tags when posting code on the forum.

Lots of stuff I can already see wrong.

  • gameObject is not a type, it’s a variable reference to the script’s owner GameObject. The actual type has a capital G.
  • Instantiate’s first parameter takes an object it wants to clone, if you want it to copy the object the script is on, just say gameObject instead of what you have.
  • You never declare what ‘a’ is, and you’re trying to manipulate that value.

Do yourself a favor and download a good IDE, Visual Studio Community Edition is free and has some stuff that makes it work well with Unity. It’ll do stuff like tell you where you have syntax errors.