Manual:DIL Manual/access
Jump to navigation
Jump to search
Contents
access
Field (integer, read-only; on a zoneptr).
z.access : integer
The zone's access level: the fourth column of vme/etc/zonelist, 0 to 255, where 0 is the most trusted. Many DIL functions and fields look at the access level of the zone a program comes from: assigning a player's skills or lifespan, for example, needs 0. A zone with no number in that column gets 255.
Notes
- At boot the zones are reset in order of access level, 0 first.
- The reserved zones
_playersand_gmhave 255. - It can't be assigned (vmc: "Illegal lvalue"). Only the zonelist file sets it, at boot.
- On a null zoneptr it fails.
Example
dilbegin integer is_trusted(zonename : string);
var
z : zoneptr;
code
{
z := findzone(zonename);
if (z == null)
return (FALSE);
return (z.access == 0);
}
dilend
Tells whether a zone has the highest access level.