This is just part of my contract, but shows where I create the mapping, the modifier onlyMember, and the function addMember. Basically, I want to be able to add new members who can execute onlyMember functions, as I - the owner - can. I was able to add a new member, as the owner, but when I switched to the member address and tried to execute other functions that appear later in the contract (which have the modifier onlyMember attached to them), I get an error. I am wondering if I set up the addMember function incorrectly, but remix isn't giving me any errors about it.
// <------------------------- MEMBERS ------------------------->
address owner = msg.sender;
bool ifmember;
mapping(address => bool) members;
modifier onlyMember {
require(msg.sender == owner || members[msg.sender] == true);
_;
}
function addMember(address _address) public onlyMember {
ifmember = members[_address];
}
// <----------------------- END MEMBERS ----------------------->