I am trying to execute the following code:
pragma solidity ^0.5.1;
contract contractA {
function blah(int x, int y) public payable {}
}
contract contractB {
function invokeContractA() {
address a = contractA.address(this);
uint ValueToSend = 1234;
a.blah.value(ValueToSend)(2, 3);
}
}
I was getting following error in the ocde:
browser/callMethod.sol:7:31: ParserError: Expected identifier but got 'address' address a = contractA.address(this); ^-----^
After searching from ethereum.stackexchange, I found the solution and now my contract B looks like this:
contract contractB {
function invokeContractA(address _addA) public {
contractA a = contractA(_addA);
uint ValueToSend = 1234;
a.blah.value(ValueToSend)(2, 3);
}
}
Now I am getting following error on remix ide:
browser/callMethod.sol:4:19: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning. function blah(int x, int y) public payable {} ^---^
Some body please guide me.
Zulfi.