Aw int

From ActiveWiki
Jump to: navigation, search


Minimum requirements
Added in version 2.1
SDKbuild 13


int aw_int (AW_ATTRIBUTE a)

Description

Returns the value of an integer attribute.

Callback

None (returns immediately)

Notes

This method functions just like aw_bool when a boolean attribute is passed to it (e.g. aw_int (AW_UNIVERSE_ALLOW_TOURISTS)).

See SDK Attributes for more information.

Arguments

a
Attribute (defined in Aw.h).

Argument attributes

None

Return values

It will return 0 if the attribute type is not boolean or integer, is outside the range of defined attributes (i.e. 0 to AW_MAX_ATTRIBUTE - 1), or when there is no current instance.

Otherwise, it'll return a previously set integer value.

Returned attributes

None

Usage

printf ("Universe build number %d\n", aw_int (AW_UNIVERSE_BUILD_NUMBER));

See also