Hey @Cryptogirl
// here at the argument(owner) I get an error,
//that the type of argument is invalid.
//I’m not sure why Can someone HELP? 
The error might be related to the fact that owner
is not payable
, let me explain.
Whenever the function selfdestruct() is called, all the funds in your contract are automatically sent to the parameter you give for example: selfdestruct(owner)
will send all the remaining funds to owner
.
In your case, you have declared owner as follow address public owner;
but, because owner will receive funds, the address has to be declared or casted as payable.
You can do these 3 things:
- Declare
owner
as payable address payable public owner;
- Cast
owner
to payable
function suicide() public onlyOwner {
selfdestruct(payable(owner));
}
- Use
msg.sender
instead of owner, because your function already uses a onlyowner
modified (therefore you know that msg.sender == owner):
function suicide() public onlyOwner {
selfdestruct(msg.sender);
}
Give it a try and keep me posted 
Happy learning!
Dani