cypren Wanderer
Joined: 03 Nov 2000 Posts: 59
|
Posted: Sat Feb 10, 2007 1:42 pm
[1.24] Nested %exec functions do not return output |
If a user-defined function which operates off of an %exec() calls a sub-function which also uses %exec(), the final results are returned and executed as commands rather than simply returned as a string list.
Example:
Code: |
#FUNCTION foo %exec("#LOOP 1,14 { @fwiz(50,%i) }")
#FUNCTION fwiz %mod(%1,%2)
#ECHO @foo |
This will echo:
Code: |
0|0|2|2|0|2|1|2|5|0|6|2|11|8 |
Now enter:
Code: |
#FUNCTION fwiz %exec("%mod(%1,%2)")
#ECHO @foo |
And you will get, sent to the MUD as typed commands:
Code: |
0
0
2
2
0
2
1
2
5
0
6
2
11
8 |
This behavior is the same in zMUD, but the documentation for both products mentions nothing about nested %exec() statements being a problem. |
|