// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract AdditionGame {
address public owner;
constructor() public {
owner = msg.sender;
}
function getBalance() public view returns (uint) {
return address(this).balance;
}
function deposit() public payable{
require(msg.sender == owner);
}
function transfer(uint _value) public returns (bool){
require(getBalance() >= _value);
msg.sender.transfer(_value);
return true;
}
}
이 중에서 msg.sender.tranfer(_value); 줄에서
"sender" and "transfer" are only available for objects of type "address payable" , not "address".
라는 에러가 뜨는데 어떻게 해야 하나요??