When I’m declaring my block number as zero in loosecollider(I chose it to do the fix) I get this error. Same code usage is not an issue in course. What can I do?
The Error is:
static member cannot be accessed with an instance reference…
When I’m declaring my block number as zero in loosecollider(I chose it to do the fix) I get this error. Same code usage is not an issue in course. What can I do?
The Error is:
static member cannot be accessed with an instance reference…
Hi,
You need to use the class not the instance of the class. So, in this case, use;
BrickShot.BlockNumber = 0;
Note, the capital “B” for the class as opposed to your lower-case “b” for the private variable at the top of your code example.
Note, you can just paste your code into your forum posts, this is much easier than screenshots as it enables those who respond to copy and paste parts of it back for you to see.
See also;
Thanks Rob, You’re golden
I’ll keep in mind your warning too
Hehe, you’re very welcome
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.