3

I have copied the original crowd sale code from the Ethereum website and pasted it in the solidity contract source code field. Code is untouched, precisely as on the Ethereum website. For some reason the network says could not compile source code and Expected token Semicolon got 'eth_compileSolidity' uint amount += msg.value;

I have tried to restart the Ethereum wallet but nothing works.

1
  • What editor are you using? What compiler version? It compiles just fine in Remix. Commented Jun 15, 2018 at 20:27

1 Answer 1

-1

Try removing the + in

uint amount += msg.value;

I changed it to

uint amount = msg.value;

It makes more sense if you ask me since you don't need to keep incrementing the value of amount every time someone gives Ether in a Crowdsale.

1
  • I don't see such line in the example? Commented Jun 15, 2018 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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