C
C#2y ago
HydraCube

❔ Random numberGen Error

Trying to make a random number generator, and I keep getting this error: "A field initializer cannot reference the non-static field, method, or property 'combat.numberGen'"
5 Replies
Jimmacle
Jimmacle2y ago
access modifiers aren't valid inside a method
HydraCube
HydraCubeOP2y ago
Okay, so how can I re-arrange the code so it works?
Angius
Angius2y ago
Remove access modifiers From the local variables, that is
Servator
Servator2y ago
delete public keywords in counter() method
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server