Manual:DIL Manual/help
Jump to navigation
Jump to search
Contents
help
Field (string, read-only in practice; on a zoneptr).
z.help : string
The zone's help text for players: the help text in the zone file's %zone header. Empty when the header has none. Players read it with help area (helpzon.zon) in the zone they are in.
Notes
- Don't assign it. vmc accepts the assignment, but the interpreter then frees memory it doesn't own (
vme/src/dilfld.cpp,DILF_HELP), which crashes the server or corrupts its memory, and the new text is lost anyway. - On a null zoneptr it fails.
- Like every field name,
helpis a reserved word: a variable or parameter can't be calledhelp(vmc: "syntax error").
Example
dilbegin show_area(pc : unitptr, z : zoneptr);
code
{
if (z == null)
return;
if (length(z.help) > 1)
{
sendtext("You are in the area known as: " + z.title + ".<br/>", pc);
pagestring(z.help, pc);
}
else
sendtext("There is no help on this area written by the creators.<br/>", pc);
}
dilend
Shows a zone's help to a player, as help area does in helpzon.zon.