MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 1 | SYNOPSIS |
| 2 | int call_direct_resolved(mixed result, object ob, string func, ...) |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 3 | int* call_direct_resolved(mixed* result, object* ob, string func, ...) |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 4 | |
| 5 | DESCRIPTION |
| 6 | Similar to call_direct(). If ob->func() is defined and publicly |
| 7 | accessible, any of the optional extra arguments are passed to |
| 8 | ob->func(...). The result of that function call is stored in |
| 9 | result, which must be passed by reference. |
| 10 | |
| 11 | This efun is a twin to call_resolved(), with the difference |
| 12 | being that call_direct_resolved() never calls a default method. |
| 13 | |
| 14 | The efun returns 1 if the function could be called. |
| 15 | If ob::fun does not define a publicly accessible function, the |
| 16 | efun will return 0. |
| 17 | |
| 18 | ob can also be an object_name. If a string is passed for ob, and |
| 19 | no object with that name does exist, an error occurs. |
| 20 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 21 | Additionally the efun accepts an array of objects as <ob>: the |
| 22 | function is called with the same arguments in all the given objects. |
| 23 | The single results are collected in two arrays, one for the result |
| 24 | of the function calls that will be stored in the result parameter, |
| 25 | and one for the efun result codes that will finally be returned from |
| 26 | the efun. Array elements can be objects or the names of existing |
| 27 | objects; destructed objects and 0s will yield a '0' as result in |
| 28 | both arrays, but don't cause an error. |
| 29 | |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 30 | HISTORY |
| 31 | Introduced in LDMud 3.3.113 with the H_DEFAULT_METHOD hook. |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 32 | LDMud 3.6.2 added array calls. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 33 | |
| 34 | SEE ALSO |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 35 | call_other(E), call_strict(E), call_resolved(E), call_direct(E), |
| 36 | call_direct_strict(E), create(A), pragma(LPC), extern_call(E), |
| 37 | function_exists(E), functions(LPC), map_objects(E) |