/* If I change it like that it still fails */
function () {
amount += msg.value;
}
Is there something like, it's generally not possible to send eth to a token contract?
If you are using Solidity >= 0.4, you will need to add payable
to the function for it to accept Ether.
function() payable {
amount += msg.value;
}