- Home /
Ambiguous reference: how to fix ?
Hi! Can you help me please?!! I have:
BCE0004: Ambiguous reference 'fireMode': fireMode, fireMode.
and the part of script:
if(mags != null && mags.firstMode != fireMode.launcher){
(sorry for my bad english, I am french...)
Nothing wrong with your English :-) just you haven't provided enough code :-(
Yes, you should post more code, like what is fire$$anonymous$$ode and how it is declared. $$anonymous$$aybe in the method you are, there is another fire$$anonymous$$ode variable declared and the compiler does not know which one to take.
As @$$anonymous$$iraSensei said, the compiler thinks you have two variables named Fire$$anonymous$$ode which is ambiguous, because it doesn't know what you're referring to, but you haven't posted enough code for us to help us actually find the error.
Without seeing your code, you're probably declaring firemode twice (maybe globally and locally...or perhaps you made a typo somewhere and firemode should be firstmode?
Is there a script called the same as a variable?
Is there a variable called the same as a type?