Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

an object reference is required for the non static field error

$
0
0
Hello, I'm trying to set a state in another script: // Rubber Spider private enum RubberSpiderQuest { not_started, started, complete } private RubberSpiderQuest myRubberSpiderQuest; public static void startRubberSpiderQuest() { myRubberSpiderQuest = RubberSpiderQuest.started; } Something like that: In my main script I'm trying to do this: // Save Quest State UserInformation.startRubberSpiderQuest(); But In my UserInformation script I get the following error: *An object reference is required for the non-static field, method, or property 'UserInformation.myRubberSpiderQuest'* Any idea how I correct this?

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>