Right now, if the player enter raffle multiple times, then player address is pushed into the s_funders multiple times.
So checking whether player is already in the array and pushing player only after if player is not in the array by adding:
if (s_addressToAmountFunded[msg.sender] == 0) { s_funders.push(msg.sender);
With this, we are still allowing to enter the same player to enter multiple times but it won't store the player address multiple times.
We actually want the player address to be stored multiple times if they enter multiple times, otherwise each additional entry won't give them a better chance of winning!
Right now, if the player enter raffle multiple times, then player address is pushed into the
s_funders
multiple times. So checking whether player is already in the array and pushing player only after if player is not in the array by adding:if (s_addressToAmountFunded[msg.sender] == 0) { s_funders.push(msg.sender);
With this, we are still allowing to enter the same player to enter multiple times but it won't store the player address multiple times.