function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance" for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
我一直在接受
ParserError: Expected ',' but got 'for' for call"); ^-^
答案 0 :(得分:0)
您在此语句中有语法错误(可能是由拼写错误引起的):
require(address(this).balance >= value, "Address: insufficient balance" for call");
第二个参数需要是字符串文字(用引号 "
或撇号 '
包裹)或字符串变量。
您的字符串参数以引号 "
开头,但紧接着 balance
单词之后还有另一个引号,这表明字符串到此结束。但实际上,它不应该到此结束,编译器无法识别文字的其余部分。
解决方案:删除多余的引号(从 balance
字后)。
require(address(this).balance >= value, "Address: insufficient balance for call");