Manual:DIL Manual/info
Jump to navigation
Jump to search
Contents
info
Field (extraptr, read-only; units: PC).
pc.info : extraptr
A player's administrative extra descriptions: a list of extras like .extra, saved with the player, that the game keeps for itself. The public zones keep the ignore list (comm.zon) and guild membership (guilds.zon) here.
The field itself can't be assigned (vmc says "Illegal lvalue"), but the list it gives can be changed: pass it to addextra() and subextra(), test it with "name" in pc.info and pick an entry with pc.info.["name"], as with .extra.
Notes
- Players only. On an NPC, an object, a room or null the field fails.
- Saved in the player file with the rest of the player.
- An
extraptrvariable holding one of its entries becomes null at everywaitorpause; look the entry up again afterwards.
Example
dilbegin remember_note(arg : string);
var
ex : extraptr;
code
{
if (self.type != UNIT_ST_PC)
quit;
ex := self.info.["$note"];
if (ex == null)
{
addextra(self.info, {"$note"}, arg);
sendtext("Noted.<br/>", self);
}
else
{
sendtext("Your note was: " + ex.descr + "<br/>", self);
subextra(self.info, "$note");
}
quit;
}
dilend
Keeps one note on the player in .info, the way comm.zon keeps the ignore list.