C
C#6mo ago
Owltávio

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
Zendist
Zendist6mo ago
Show the code 😊.
Owltávio
OwltávioOP6mo ago
BlazeBin - fmfwyxkuoonb
A tool for sharing your source code with the world!
Zendist
Zendist6mo ago
i.Register() instead. You're trying to use Register() like a class method (static) and not calling it on the instance.
Owltávio
OwltávioOP6mo ago
oh okay Thanks, it worked.
Want results from more Discord servers?
Add your server