Hi,
I am getting compilation error with following Smart contract written in version 8Solidity:
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.10;
contract T {
address payable k;
uint public cP = 100;
address payable owner;
constructor() {
owner = payable (msg.sender);
}
function sC(uint val) public payable{
owner.transfer(val);
}
receive() external payable {
if (msg.value < cP) revert;
int c= 100;
k.send(c);
}
}
I am getting the following error:
TypeError: No matching declaration found after variable lookup.
--> remix2.sol:17:22:
|
17 | if (msg.value < cP) revert;
| ^^^^^^
Somebody please guide me.
Zulfi.