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

Error CS0120

$
0
0
I know it has been asked a lot, but I noticed that the answer was always different from the others, so I ask it with my code, because I haven't find the answer I need: I've got a script which has a variable "batteria" and this variable varies (well, being how much a battery will live, decreases) over time. I need to call that variable from a GUI script, so that the user can see it, but it tells me "An object reference is required to access non-static member `LightScript.batteria'". What should I do?

Viewing all articles
Browse latest Browse all 7934

Trending Articles



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