GUI Texture error.

I’m trying to make a Power bar work for my game, I have all my textures and the code for it count from 0 to 1000 and back to 0. Whilst it is counting to 1000 I want the GUI Texture to display the bar moving up and down. But I keep getting this error. Anyone help?

var currentPower:int = 0;
var maxPower:int = 1000;
var Power0:Texture2D;
var Power10:Texture2D;
var Power20:Texture2D;
var Power30:Texture2D;
var Power40:Texture2D;
var Power50:Texture2D;
var Power60:Texture2D;
var Power70:Texture2D;
var Power80:Texture2D;
var Power90:Texture2D;
var Power100:Texture2D;
var PowerBarIsRising :boolean = true;
var barSpeed :float = 5.0;
var powerToApply :int;
var powerBar:GUITexture;



function Start () {
	powerBar= GameObject.Find("PowerBar");
	powerBar.guiTexture.texture = Power100;![5674-error.png|833x89](upload://wXxPkkoZ2WwnqfynTD9KJ4EEwIA.png)
}

You declare powerBar as GUITexture but during start you pass a GameObject to it. Change the line

var powerBar : GUITexture;

to

var powerBar:GameObject;

and it should work as intended.