C
C#3y 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
Jimmacle3y ago
access modifiers aren't valid inside a method
HydraCube
HydraCubeOP3y ago
Okay, so how can I re-arrange the code so it works?
Angius
Angius3y ago
Remove access modifiers From the local variables, that is
DeliBey
DeliBey3y ago
delete public keywords in counter() method
Accord
Accord3y 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.

Did you find this page helpful?