In solidity every variable is set to 0 by default.
You should think of mappings as all possible combinations are set to 0 by default.
In your specific case I would use the following:
if (buyers[msg.sender].amount == 0)
In solidity every variable is set to 0 by default.
You should think of mappings as all possible combinations are set to 0 by default.
In your specific case I would use the following:
if (buyers[msg.sender].amount == 0)