Aw has world right

From ActiveWiki
Jump to: navigation, search



Minimum requirements
Added in version 4.1


int aw_has_world_right (int citizen, AW_ATTRIBUTE right)

Description

Checks if a citizen has been granted a certain world right.

Callback

None (returns immediately)

Notes

Instance must have entered a world in order to execute this method successfully.

Argument

citizen
Citizen number.
right
World right attribute.

The provided world right attribute must be one of the following:

Argument attributes

None

Return values

0
Citizen has not been granted the right. Also returned if an error occurred.
1
Citizen has been granted the right.

Returned attributes

None

Usage

Check for build rights in world.

if (aw_has_world_right (176, AW_WORLD_BUILD_RIGHT))
  printf ("Citizen# 176 may build in this world\n");
else
  printf ("Citizen# 176 must not build in this world\n");

See also