mapping(uint256 => address) public userList;
function getUserCount() public constant returns(uint userCount) {
return userList.length;
}
function newUser(address _address) internal returns(bool success) {
userList.push(_address);
return true;
}
function getUser(uint256 _userId) public constant returns(address){
return(userList[_userId]);
}
throws error "member length can not be found" - can somebody explain to me why this doesn't work? i've looked at the storage patterns list and saw that they would add an additional array to have a user count - i was really trying to avoid that so that on high demand two users would not get the same id, by setting their id to length - was just planning to push the new users without setting an id manually