Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Resource saveResourceProperties

From Catglobe Wiki



Resource_saveResourceProperties

Save a resource's properties to the database

Syntax

Resource_saveResourceProperties(resourceId, properties)

Arguments

  • resourceId: is a number expression. It is the resource's unique id
  • properties: is an array, it is the property array which has the same format as what described in Resource_getResourceProperties function

Return value

empty

Example

array properties = Resource_getResourceProperties(15543655);

number i;

number n = arrayCount(properties);

for (i = 0; i <n; i = i + 1)

{

if (properties[i][RESOURCE_PROPERTY_TYPE] == RESOURCE_PROPERTY_TYPE_SINGLE)

//set the first option selected

properties[i][RESOURCE_PROPERTY_VALUE] = 1;

}

Resource_saveResourceProperties(15543655, properties);

Availability

Version 5.6