Question by
coopmaster · Aug 28, 2016 at 12:10 AM ·
c#object
A field initializer cannot reference the non-static field, method, or property 'PlayerScript.regulargun' Error
I can not fix this problem, i unable to understand why its giving me this error. I have put it in start() in update() and nothing please help. ![alt text][1] [1]: /storage/temp/77047-untitled-1.jpg
untitled-1.jpg
(265.6 kB)
Comment
i need to see more of the code to be able to tell what is going on. you can paste in code by clicking the 101 010 button. where are you declaring regulargun, regularammo and regulargunclipsize?
Your answer
Follow this Question
Related Questions
Can't get to work a non behaviour constructor with random generated variables 1 Answer
Advance Colision Detection 1 Answer
Obstacle Spawner Efficiency 0 Answers
Creating an object using a prefab, with parent, text etc.. 1 Answer
Problema al crear objeto por segunda vez. Problem to instantatiate a object for second try. 1 Answer