Maybe this is really obvious but for some reason I can't shake this error. At compile I get the following error:
TypeError: Indexed expression has to be a type, mapping or array (is uint256)
voteType[msg.sender] = 2;
^------^
Compilation failed. See above.
The indexed expression is a mapping to a type (uint
) which should be all good.
Relevant code:
function castVote (uint voteType) canVote {
// require (voteType[msg.sender] == 0);
if (voteType == 2) {//2 here meaning "Real" account.
count[upForVote].voteReal++;
voteType[msg.sender] = 2;
}
if (voteType == 1) {//1 here meaning "Fake" acount.
count[upForVote].voteFake++;
voteType[msg.sender] = 1;
}
voteInProgress[msg.sender] = true;
}
voteType
please? – Roman Frolov Jan 30 '18 at 1:04