Hi everyone!
I have created a hashMap that has as a key the userID(Principal) and as a value a “type Points”. I want to update the value by adding or removing points to the user profile.
public type UserID = Principal;
public type Points = {points: Float;}
public func updatePoints(userid: UserID, points: Points) {
hashMap.put(userid, hashMap.get(userid) + points.points);
};
Error:
type error, operator not defined for operand types
?Points/1
and
Float