smartcontractkit/full-blockchain-solidity-course-js

ParserError: Expected ';' but got ','

Benedicity948 opened this issue · 2 comments

Lesson

Lesson 4

Could you please leave a link to the timestamp in the video where this error occurs? (You can right click a video and "copy video URL at current time")

https://youtu.be/gyMwXuJrbJQ?t=17343

Operating System

Windows

Describe the bug

ParserError: Expected ';' but got ','
--> contracts/FundMe.sol:55:26:
|
55 | {bool callSuccess, } = payable(msg.sender).call{value: address(this).balance}("");
| ^

I keep encountering this error every time in my contract. Please anyone with a solution.

put your complete code...

it should be (bool callSuccess, ) = payable(msg.sender).call{value: address(this).balance(""); instead of {bool callSuccess, } = payable(msg.sender).call{value: address(this).balance}("");

use () instead of {}