i am trying to create e platform which people can contribute in answering questions by sending funds with specific answer to a question: group A or B,
can anyone help me why am i getting this error?
pragma solidity ^0.8.2;
contract prediction {
address private Manager;
string public Question;
string public winnerGroup;
mapping(address => string) userGroup;
mapping(address => uint) payment;
//mapping(address => uint) profitPerUser;
constructor(string memory _Question) {
Manager == msg.sender;
Question = _Question;
}
modifier onlyManager() {
require(msg.sender == Manager);
_;
}
struct group_A {
address[] addresses;
uint totalFund;
uint userCount;
uint profitPerUser;
}
struct group_B {
address[] addresses;
uint totalFund;
uint userCount;
uint profitPerUser;
}
function pickAnswerA() public payable {
group_A.addresses.push(msg.sender);
payment[msg.sender] += msg.value;
group_A.totalFund = msg.value;
group_A.userCount += 1;
userGroup[msg.sender] == "A";
}
function pickAnswerB() public payable {
group_B.addresses.push(msg.sender);
payment[msg.sender] += msg.value;
group_B.totalFund += msg.value;
group_B.userCount += 1;
userGroup[msg.sender] == "B";
}