Manual:DIL Manual/objcount
Jump to navigation
Jump to search
Contents
objcount
Field (integer, read-only; on a zoneptr).
z.objcount : integer
Meant to be the number of objects the zone defines, but the server never counts them: it is always 0. To count the copies of one object in the game, use loadcount.
Notes
- It can't be assigned (vmc: "Illegal lvalue").
- On a null zoneptr it fails.
- roomcount does count the zone's rooms.
Example
dilbegin string zone_sizes(z : zoneptr);
code
{
if (z == null)
return ("");
return (z.name + ": " + itoa(z.roomcount) + " rooms, " + itoa(z.objcount) + " objects.");
}
dilend
Tells the size of a zone; the object count shows 0 until the server counts objects.