# llSetParcelForSale

*LSL function*

```lsl
integer integer llSetParcelForSale(integer ForSale, list Options);
```

- `integer ForSale`: Boolean. If TRUE, puts the parcel up for sale; if FALSE, removes it from sale.
- `list Options`: A list of options to configure the sale (e.g., price, authorized buyer, and object inclusion).

- Returns: `integer`
- Energy: 10
- Permission: `PERMISSION_PRIVILEGED_LAND_ACCESS`

Sets the parcel the object is on for sale.\\nForSale is a boolean, if [TRUE](/constants/TRUE/)

the parcel is put up for sale. **Options** is a list of options to set for the sale,

such as price, authorized buyer, and whether to include objects on the parcel.\\n

Setting **ForSale** to [FALSE](/constants/FALSE/) will remove the parcel from sale and clear any options

that were set.

This function requires that the script be owned by the parcel owner and that they have granted the [PERMISSION_PRIVILEGED_LAND_ACCESS](/constants/PERMISSION_PRIVILEGED_LAND_ACCESS/) permission.

Returns an [integer](https://wiki.secondlife.com/wiki/integer) Error code or 0 if successful.

```lsl title="How to use" frame="terminal"
integer result = llSetParcelForSale(0, []);
```

## Specification

Constant group [ParcelSaleParam](/constants/groups/ParcelSaleParam/):

```lsl
PARCEL_SALE_AGENT = 2
PARCEL_SALE_OBJECTS = 3
PARCEL_SALE_PRICE = 1
```

| Constants | Value | Description |
| --- | --- | --- |
| [PARCEL_SALE_AGENT](/constants/PARCEL_SALE_AGENT/) | 2 | The agent id authorized to purchase the parcel. If none set, any agent may purchase. |
| [PARCEL_SALE_OBJECTS](/constants/PARCEL_SALE_OBJECTS/) | 3 | If [TRUE](/constants/TRUE/), objects on the parcel are included in the sale. |
| [PARCEL_SALE_PRICE](/constants/PARCEL_SALE_PRICE/) | 1 | The price of the parcel. If no authorized agent is set, must be greater than 0. |

| Constants | Value | Description |
| --- | --- | --- |
| [PARCEL_SALE_OK](/constants/PARCEL_SALE_OK/) | 0 | The sale information was successfully set. |
| [PARCEL_SALE_ERROR_NO_PARCEL](/constants/PARCEL_SALE_ERROR_NO_PARCEL/) | 1 | The parcel could not be found. |
| [PARCEL_SALE_ERROR_NO_PERMISSIONS](/constants/PARCEL_SALE_ERROR_NO_PERMISSIONS/) | 2 | The script does not have the required permissions to set the sale information. |
| [PARCEL_SALE_ERROR_IN_ESCROW](/constants/PARCEL_SALE_ERROR_IN_ESCROW/) | 3 | The parcel is currently in escrow and cannot be set for sale. |
| [PARCEL_SALE_ERROR_INVALID_PRICE](/constants/PARCEL_SALE_ERROR_INVALID_PRICE/) | 4 | The price set for the parcel is invalid (e.g., less than or equal to 0). |
| [PARCEL_SALE_ERROR_BAD_PARAMS](/constants/PARCEL_SALE_ERROR_BAD_PARAMS/) | 5 | The parameters provided to set the sale information are invalid. |

## See also

### Functions

- [llRequestPermissions](/functions/llRequestPermissions/) — Request script permissions

---

*Source: [LlSetParcelForSale](https://wiki.secondlife.com/wiki/LlSetParcelForSale) on the Second Life Wiki. Content from the Second Life Wiki articles LlSetParcelForSale (revision 1218605, 2026-02-02), Template:LSL Constants/ForSaleError (revision 1218604, 2026-02-02) and Template:LSL Constants/ForSale (revision 1218601, 2026-02-02), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llSetParcelForSale/
