QUERY_NAME(L) NAME query_name - return the name of an object SYNOPSIS string query_name(); LOCATION Most objects that players can interact with should have this. RETURN VALUE The name of the object DESCRIPTION Fairly obvious. NOTES The string that query_name() returns should be one of the object's id's (that is, id() should return 1 when the name is passed to it). If you are making your own object and not inheriting a standard file, you must assure that this is so yourself. It is not a rule that objects must have a query_name() function, but it is a good idea. The name should be short, should not be capitalized unless it is a "proper" name, and should not contain articles (it should be "sword" instead of "a sword" or "the sword"). When referencing other objects, do not assume query_name() will return a string. Alas, not all wizards have used it. Standard mudlib files such as weapon.c, etc., will return the name that was set with the set_name() lfun. Monsters and players will return the capitalized form of their names. SEE ALSO set_name(L), short(L), id(L), query_real_name(L)
Help topics available:
You are guest number 131 since November 2019.
This file was last modified: June 2000.