// Script: clear_toppings

void main()
{
    object oPC = OBJECT_SELF; // Assume this script is called with the player as OBJECT_SELF

    int nToppingCount = GetLocalInt(oPC, "ToppingCount");

    // Clear all topping variables
    int i;
    for (i = 1; i <= nToppingCount; i++)
    {
        DeleteLocalString(oPC, "sTopping" + IntToString(i));
    }

    SetLocalInt(oPC, "ToppingCount", 0); // Reset topping count
    SendMessageToPC(oPC, "Your toppings have been cleared. You can now create a new custom pizza.");
}
