Trying to create objects using a loop, but don't know what i'm doing wrong?
so i'm trying to update my turtle race simulator using tasks, one of the changes is to be able to choose the number of turtles participating in the race using a loop, but I keep getting the compile error CS0120, could anyone explain what I'm doing wrong?
4 Replies
Show the code 😊.
BlazeBin - fmfwyxkuoonb
A tool for sharing your source code with the world!
i.Register()
instead.
You're trying to use Register()
like a class method (static) and not calling it on the instance.oh okay
Thanks, it worked.