Gold per second "Update Can Not Be A Corountine"

want a very simple script to add “Gold” every second like in league of ledgends for example.
however i dont understand the error.

#pragma strict


//function updates and gives X amount of Gold per second.
function Update () {yield WaitForSeconds (0.4);{
GOLD.Gold += 1;

}
}

another alternative solution could be:

function Start(){
  InvokeRepeating("addGold",1f,1f);
}

function addGold(){
  Gold.gold+=1;
}

If you want something per second try this:

var gold : float;

function Update(){
    gold +=Time.deltaTime;
}

You can read about time.deltatime here: Unity - Scripting API: Time.deltaTime. Also, if you want to use yield, you might want to read about Ienumerator’s. Also, here is something on corountines :http://unity3d.com/learn/tutorials/modules/intermediate/scripting/coroutines