C
C#15mo 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
Jimmacle15mo ago
access modifiers aren't valid inside a method
HydraCube
HydraCube15mo ago
Okay, so how can I re-arrange the code so it works?
Angius
Angius15mo ago
Remove access modifiers From the local variables, that is
Servator
Servator15mo ago
delete public keywords in counter() method
Accord
Accord15mo 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.