Phantasmal MUD Lib for DGD

Phantasmal Site > Phantasmal API > API Listing > direction_by_string

API Function: direction_by_string

Summary:
take a direction name as a string and return a numerical direction, recognized by ExitD.

Defined In LPC Object:
/usr/common/sys/exitd.c

Prototype:
int direction_by_string(string direction_name)

Can Be Called By:
Anybody

Description:

Take a string naming a direction, such as "nw" or "up" or "northeast", and return a numerical direction recognized by ExitD. Direction numbers are defined in <exit.h>.

Return Value:

A numerical direction, or -1 if the string isn't recognized.

Errors:
Normally none.

See Also:
get_short_for_dir , direction_by_string , opposite_direction