Ambiguous References: Builtins and Player

Hey Everyone,

It seems Unity’s in a cranky mood today, as it’s bombarding me with errors (either that or I’m too decaffeinated). Either way, I somehow managed to get two ambiguous references in my script at once. Here’s the code and the error it gives me:

private var attackSkills : boolean[];
function Start(){
	attackSkills = new boolean[true,false,false,false];
}

[I]//Returns: BCE0004: Ambiguous reference 'Builtins': Boo.Lang.Builtins, Boo.Lang.Builtins.[/I]
private var playerScript : Player;

[I]//Works in all other scripts, now returns:  BCE0004: Ambiguous reference 'Player': Player, Player.[/I]

Now, I could understand Unity’s confusion had it asked me to choose between, say, System.Player and UnityEngine.Player… but it’s not. It’s asking me to choose between Player and Player. Same with Boo.Lang.Builtins. For me it’s an easy call, but Unity seems a bit undecisive today.

As always, any help would be much appreciated. =)

-Patrick

carefully bumps

Anyone? =/

For the first problem, the syntax is not correct. You can achieve the same thing by using:-

attackSkills = new Array(true,false,false,false).ToBuiltin(boolean);

There is nothing wrong with the declaration of the playerScript variable. Is the first error in the Player.js file?

D’ow, I figured I could declare it just like that (or var attackSkills = new Boolean[4]). That fixes one of my problems, thanks! =) The Player one still persists though. Player.js is completely error-free, and I use the same declaration (literally, I copy-pasted it from my levelScript just to be sure) and it works fine there. I guess it works like this as well since it’s being implicitly casted, but I still feel dirty about it. =K

Well this is … special. I copy-pasted the entire script to a new .js file in the same directory and, lo and behold, it works! I’m thinking this might be a bug on Unity’s side now. Any other ideas as to what might’ve caused this?