SDatabase
في هذا الصنفGetRegionValue
| دالة | GetRegionValue | Get a value stored in the region database. (this does not access the same database as the SPersistence class) |
| دالة | SetRegionValue | Store a "value" in the region database. (this does not access the same database as the SPersistence class) |
| دالة | GetPlayerValue | Get a value stored in a player database. (this does not access the same database as the SPersistence class) |
| دالة | SetPlayerValue | Store a "value" in a player database. (this does not access the same database as the SPersistence class). (this does not access the same database as the SPersistence class) |
الدوال
GetRegionValue
Get a value stored in the region database. (this does not access the same database as the SPersistence class)
المعاملات
| Parameter | Type | Description |
|---|---|---|
| key | string | The "key" to access the record from the region database. |
| onResult | Closure | The name of the function which will be called once the results are ready. This function will be called with a string parameter containing the requested value. onResult(value) |
القيم المرجعة
void
مثال
function onResult(value)
yourValue = value
end
Space.Database.GetRegionValue("testKey", onResult)
SetRegionValue
Store a "value" in the region database. (this does not access the same database as the SPersistence class)
المعاملات
| المعامل | النوع | الوصف |
|---|---|---|
| key | string | The "key" to access the record from the region database. |
| value | string | The "value" that will be stored in the region database. |
| onSave | Closure | The name of the function which will be called when the "value" has been stored in the region database. |
القيم المرجعة
void
مثال
function onSave()
--
end
Space.Database.SetRegionValue("testKey", "testValue", onSave)
GetPlayerValue
Get a value stored in a player database. (this does not access the same database as the SPersistence class)
المعاملات
| المعامل | النوع | الوصف |
|---|---|---|
| player | int | The ID of the player's database in whose record we will access. |
| key | string | The "key" to access the record from the region database. |
| onResult | Closure | The name of the function which will be called once the results are ready. |
القيم المرجعة
void
مثال
function onResult(value)
yourValue = value
end
Space.Database.GetPlayerValue(aPlayerID,"testKey",onResult)
SetPlayerValue
Store a "value" in a player database. (this does not access the same database as the SPersistence class). (this does not access the same database as the SPersistence class)
المعاملات
| المعامل | النوع | الوصف |
|---|---|---|
| player | int | The ID of the player's database in whose record we will access. |
| key | string | The "key" to access the record from the region database. |
| onSave | Closure | The name of the function which will be called when the "value" has been stored in the player database. |
القيم المرجعة
void
مثال
function onSave()
--
end
Space.Database.SetPlayerValue(aPlayerID,"testKey", "testValue",onSave)



