
int donation_amount = arbitrary_packet_parsing_function();
if (donation_amount <= donor_gold)
{
// Decrement the donor's money
// donor_gold is of type int
donor_gold -= donation_amount;
// Increment the donee's money
// donee_gold is of type int
donee_gold += donation_amount;
}