我在行returnString(“that”)上收到一条错误消息,上面写着:
DeclarationError:未声明的标识符。returnString(“测试”);
function returnString (string checkers) external view returns(string) {
return checkers;
}
function getBidders() public {
returnString("testing");
}为什么这个不行?
发布于 2018-03-06 00:57:49
这是因为您正在调用returnString函数,从内部声明为external,声明为public函数。将returnString函数声明为public,因为您是从内部调用它的。
function returnString (string checkers) public view returns(string) {
return checkers;
}请看这答案,以供参考。
https://ethereum.stackexchange.com/questions/41822
复制相似问题