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?
↧