GetPropertyById
exports['kartik-properties']:GetPropertyById(id)๐น Description
Returns a single property as a normalised shaped property record, or nil if no property with that id exists.
๐ง Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | number | string | โ | The property id. |
๐ค Returns
| Type | Description |
|---|---|
table | The shaped property record. |
nil | If no property exists with the given id. |
๐ง Example Usage
local p = exports['kartik-properties']:GetPropertyById(42)
if p then
print(('#%d %s owned by %s'):format(p.id, p.label, p.ownerName))
end๐ Notes
- The
idis coerced to an integer, so both42and"42"are accepted.