0

I am getting an error when coding a token with the Ethereum wallet. Namely, Expected pragma, import directive or contract/interface/library definition. function burn (uint256 _value)public returns(bool success) {

could anyone help me with this error, as i am not sure what is really missing,enter image description here in this line of code.

  • 1
    The issue is likely before that line of code. Can you edit your question to include all of the contract code, rather than just a screen shot? – Richard Horrocks Mar 28 at 23:09
0

Hard to be 100% sure without the code, but it's consistent with closing out the contract {} block with an extra } so that function is outside of it where it should not be. Out there, you're only allowed pragma, contract, library, etc. as enumerated in the message.

Look for an extra } after the function before the section shown.

Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.