Previous Topic: parseDateNext Topic: rollDate


resetResource

The resetResource function resets one or more resources in a resource object by unlocking them and setting the used count to zero. If you specify a value for resourceName, only that resource is reset. If you leave resourceName empty, all of the resources in the resources object are reset.

Note: If you specify a value for resourceName and that resource does not exist, the resource is created with an amount of zero and set to the unlocked state.

Syntax

bSuccess = resetResource(resourcePath, resourceName)

Arguments

resourcePath (String)

Specifies the path of the resources object.

resourceName (String)

Specifies the name of the resource in the resources object.

Return Value

bSuccess (Boolean)

Returns true if the function call is successful and false if it fails.