I'm delving into smart contracts more, and i've copy/pasted the example "Improved Token - Full Coin Node" from https://www.ethereum.org/token. (I'd post it here it but it breaks the code formatting when i do and i have no clue how to fix it....sorry)
I'm very confused on a few things. Certain functions, such as Buy, Sell, and Freeze Account to name a few, do not work at all and throw the error
"The contract won't allow this transaction to be executed"
and
"If you submit this transaction, it will consume all the gas provided".
From my understanding, the only way to send ETH to this address is via a payable function (the "Buy" function, in my case).
I'm unsure as to what is going wrong. Another thread on here posited that it has to do with this part of the "Buy" function :
_transfer(this, msg.sender, amount);
If anyone could point me in the right direction to understand what I am doing wrong here, I would be very appreciative.