struct userData{
uint val;
bool isvalue;
string name;
}
mapping(uint => address) internal users;
mapping(address => userData) internal bidirectionalUsers;
function addMember(address newMember, string memberName) public{
if (msg.sender != owner) return;
if (bidirectionalUsers[newMember].isvalue) return;
users[memberCount] = newMember;
bidirectionalUsers[newMember] = userData(memberCount,true,memberName);
}
Above code is throwing warning in addMember(), gas limit is high:infinite and it can not be executed
.
I commented all the lines inside the function but still it throws this warning. What I'm doing wrong here? Can somebody help me in this. Thank you.