Update doc/efun/ aus Driversourcen.
Manpages der efuns aktualisiert, neue Manpages hinzugefuegt.
Change-Id: I7cc91684269ff56d1aef47d5c5e7c87f7fd531dc
diff --git a/doc/efun/notify_fail b/doc/efun/notify_fail
index b161c42..f566460 100644
--- a/doc/efun/notify_fail
+++ b/doc/efun/notify_fail
@@ -2,35 +2,37 @@
int notify_fail(string str)
int notify_fail(closure cl)
-BESCHREIBUNG
- Der String <str> wird als Kommando-Fehlermeldung anstelle des default
- "What?" gespeichert. Das Resultat ist stets 0.
+DESCRIPTION
+ Store str as the error message given instead of the default
+ message ``What ?''. The result is always 0.
- Wird eine Closure als Argument gegeben, wird sie im Fehlerfall
- (also erst wenn ein Kommando endgueltig fehlgeschlagen hat)
- ausgefuehrt und hat die Fehlermeldung als Resultat
- zurueckzugeben. Die Closure erhaelt als Argument den
- originalen Befehlsgeber; in der Regel dies ist this_player(),
- was aber vom MODIFY_CMD hook geaendert werden kann.
+ If a closure is given, it is executed to return the error
+ message string, but not before all attempts to execute the
+ commandline failed (read: not at the time of the call to
+ notify_fail()). The closure receives as argument the original
+ commandgiver; usually it is identical to this_player(), unless
+ the modify_cmd hook changed that.
- Wird notify_fail() mehr als einmal fuer ein Kommando
- aufgerufen, wird lediglich der letzte Aufruf gewertet.
- notify_fail() erkennt verschachtelte Kommandos (siehe Efun
- command()), und ein notify_fail() in einem Unterkommando
- hat keinen Einfluss auf das uebergeordnete Kommando.
+ If notify_fail() is called more than once for this command, only the
+ last call will be used. However, calls to notify_fail() in nested
+ commands have no effect on this command.
-BEISPIELE
- Verwendet man
+ The idea of this function is to give better error messages
+ instead of simply 'What ?'.
+ It is also better to use
notify_fail(message); return 0;
-
- anstelle von
-
+ instead of
write(message); return 1;
- erhalten andere Objekte ihre Chance, das Kommando
- (erfolgreich) auszufuehren.
+ Other objects will get the chance to evaluate the verb.
-SIEHE AUCH
+HISTORY
+ Returntype changed in LDMud 3.2.6 from void to int.
+ Since LDMud 3.2.7, notify-fail settings are saved over nested
+ commands, and NPCs can see their notify-fail messages.
+
+
+SEE ALSO
add_action(E), command(E), query_verb(E), query_command(E),
query_notify_fail(E), hooks(C)