i am having troubles when i want to compile the sol file, specifically this error:
':20:16: TypeError: Member "push" not found or not visible after argument-dependent lookup in uint32[100] storage ref\n uint32 a = people.push(12);\n ^---------^\n'
pragma solidity ^0.4.18;
contract Voting {
mapping (bytes32 => uint8) public votesReceived;
uint32[100] public people;
bytes32[] public candidateList;
function Voting(bytes32[] candidateNames) public {
candidateList = candidateNames;
people.push(12);
}
function onlyOneVote(uint32 ethaddress) returns(bool) {
bool a = autentic(ethaddress);
if (a == true) {
people.push(ethaddress);
}
}
function autentic(uint32 id) view public returns(bool) {
for(uint i = 0; i< people.length; i++) {
if(people[i] == id) {
return (false);
} else {
return(true);
}
}
}
i'm using ganache for "the blockchain" thank you in advance
uint32 ethaddress
should beaddress _ethAddress
Several bad practices in the OG post. – Matt Swezey May 16 '18 at 21:34