blob: 7e3af9440965198b39142fe175a647e371903f48 [file] [log] [blame]
Zesstrad59c3892019-11-28 20:53:39 +01001SYNOPSIS
MG Mud User88f12472016-06-24 23:31:02 +02002 void write(mixed msg)
3
Zesstra715ec202025-07-09 22:18:31 +02004DESCRIPTION
5 Write out something to the current user. What exactly will
6 be printed in the end depends of the type of msg.
MG Mud User88f12472016-06-24 23:31:02 +02007
Zesstra715ec202025-07-09 22:18:31 +02008 If it is a string or a number then just prints it out.
Zesstrad59c3892019-11-28 20:53:39 +01009
Zesstra715ec202025-07-09 22:18:31 +020010 If it is an object then the object will be printed in the
11 form: "OBJ("+object_name((object)mix)+")"
Zesstrad59c3892019-11-28 20:53:39 +010012
Zesstra715ec202025-07-09 22:18:31 +020013 If it is an array just "<ARRAY>" will be printed.
14 If it is a mapping just "<MAPPING>" will be printed.
15 If it is a closure just "<CLOSURE>" will be printed.
16
17 If the write() function is invoked by a command of an living
18 but not interactive object and the given argument is a string
19 then the lfun catch_tell() of the living will be invoked with
20 the message as argument.
21
22EXAMPLES
MG Mud User88f12472016-06-24 23:31:02 +020023 write("Hello world!\n");
Zesstra715ec202025-07-09 22:18:31 +020024
25 Just print out a string.
Zesstrad59c3892019-11-28 20:53:39 +010026
MG Mud User88f12472016-06-24 23:31:02 +020027 write(this_player());
Zesstrad59c3892019-11-28 20:53:39 +010028
Zesstra715ec202025-07-09 22:18:31 +020029 This will print out something like "OBJ(std/player#1234)".
Zesstrad59c3892019-11-28 20:53:39 +010030
Zesstra715ec202025-07-09 22:18:31 +020031 write( ({ "blub" }) );
32
33 Will print out "<ARRAY>".
34
35SEE ALSO
Zesstrad59c3892019-11-28 20:53:39 +010036 say(E), tell_object(E), tell_room(E), catch_tell(A)