# ENV_SetResourceSetArray

## Syntax

      #include <nitro/env.h>

      void ENV_SetResourceSetArray( ENVResource* array[] );

## Arguments

array | Pointer to the array of the resource array.

## Return Values

None.

## Description

Sets the resource array used in searching for resources.

Any resource arrays that have been set before this point are removed from the search target, and the array specified here becomes the target.

Inside the function, the resource array at the start of the array specified by the array argument is set by the `ENV_SetResourceSet` function, and the subsequent resource arrays up until `NULL` is encountered are added by the `ENV_AppendResourceSet` function. Close the end of array with `NULL`.

See `ENV_SetResourceSet` for more on specifying the resource array.

This function is called from the `ENV_Init` function. At that time:

> `SDK_WEAK_SYMBOL ENVResource *resourceArray[] = { NULL };
> void ENV_Init(void)
> {
> :
> ENV_SetResourceSetArray( resourceArray );
> }`

Initialization is performed for `resourceArray`, defined with the WEAK symbol. Because the `ENV_Init` function is called from the `OS_Init` function, it is all right for the application to define `resourceArray` independently as long as the `OS_Init` function is not called.

> Example:
> The user program can simply make the following definition.
> `ENVResource myResource[] = {
> "test.member", ENV_U32(100),
> ENV_RESOURCE_END
> };
> ENVResource resourceArray[] = { myResource, NULL };`

Naturally, it is acceptable to specify other resource arrays later.

> Example:
> `ENV_SetResourceSetArray( anotherResourceArray );`
> In this example, the newest configuration for `resourceArray` is used, not the one that was declared at the start.

## See Also

`ENV_Init`
`ENV_SetResourceSet`
`ENV_AppendResourceSet`

## Revision History

2008/12/19 Added examples.
2005/10/07 Initial version.

CONFIDENTIAL