function startTimer() internal {
for(uint256 i; end != 0; i++) {
address a = Ruglist[i];
if(rugBalance[a].balance == 0) {
delete rugBalance[a];
delete Ruglist[i];
}
}
cycle = 0;
end = block.timestamp + duration;
choose();
}
why would I get this error:
Note: The called function should be payable if you send value and the value you send should be less than your current balance.
makes no sense. whatever code I error I still get error. It only works if I delete all the code from the function. I am confused asf
edit: btw ignore "rug" I want to create something like a lottery where someone looses something and everyone else gets a portion of what the person lost. and this starts a countdown, removes people that got no money and after the countdown is at 0 it will continue.