pragma solidity >=0.4.0 <0.7.0;
contract New{
mapping(address => string) public users;
string name;
address[] public userAddress ;
//string[] public userNames;
function updateUser(string memory name) public{
users[msg.sender]= name;
}
function getUser(address[] calldata) external view returns(string memory){
return users.name;
}
}
I want to set a name and I want to get my name.For this reason I made a getUser func. but I can't get my name.
but I have got a error like this :
browser/asd.sol:17:16: TypeError: Member "name" not found or not visible after argument-dependent lookup in mapping(address => string storage ref). return users.name; ^--------^
what should I do ?