Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 1 | SYNOPSIS |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 2 | void write(mixed msg) |
| 3 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 4 | DESCRIPTION |
| 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 User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 7 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 8 | If it is a string or a number then just prints it out. |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 9 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 10 | If it is an object then the object will be printed in the |
| 11 | form: "OBJ("+object_name((object)mix)+")" |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 12 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 13 | 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 | |
| 22 | EXAMPLES |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 23 | write("Hello world!\n"); |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 24 | |
| 25 | Just print out a string. |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 26 | |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 27 | write(this_player()); |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 28 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 29 | This will print out something like "OBJ(std/player#1234)". |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 30 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 31 | write( ({ "blub" }) ); |
| 32 | |
| 33 | Will print out "<ARRAY>". |
| 34 | |
| 35 | SEE ALSO |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 36 | say(E), tell_object(E), tell_room(E), catch_tell(A) |