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.

  • What editor are you using? What compiler version? It compiles just fine in Remix. – Lauri Peltonen Jun 15 '18 at 20:27
-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.

  • I don't see such line in the example? – Lauri Peltonen Jun 15 '18 at 20:28

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.