Posted by
| Faux
United Kingdom (77 posts) Bio
|
Message
|
- I meant to say, I was getting that "The alias subroutine named "randsoul" could not be found." message, but a clean restart of MUSH seemed to fix it (boggle). It now doesn't do this..
- I just tried adding another trigger going to another function in the script file, and this runs without whining, too.
- It does, however, whine about not being able to find the script function in some old triggers that I have lying around (which arne't enabled). Surely that's a bug (checking functions in disabled triggers)?
- On the syntax error things, I've had quite a few where it doesn't. And I'm pretty sure I'm yet to have an error in a script called by an alias that causes MUSH to terminate. Are they called in different ways?
- Edit as I'm playing: I just deleted those triggers, and now it can't find randsoul again. And a clean restart didn't fix it.
- Just an interesting point.. if you modify the script while a "terminal" error message is on the screen, ie.. after you've typed:
And the "Unexpected $end.. etc." dialog is on the screen, the recompile msgbox comes up. Clicking yes to this means that MUSH doesn't crash when you close the script error dialog, but afterwards pretty much everything is broken. Like, scriping (won't even let you press return when there's something begining with "/" (assuming script character) is on the line), and, interestingly, hotkeys (ie. numpad types numbers). You can still (apparently) cleanly shutdown mush, though. It's far to late/early for me to play with a debugger, I'm afraid :). This does, however, give you an oppotunity to save if you forget, so, if you could just leave it in for a little while longer... :p
Hope that makes sense..
- Another thing, not all syntax errors seem to cause a crash, anyway...
brings up the error dialog with:
No.: 1000
Call to undefined function randymonkey()
Line in error:
Maybe it only dies on.. hmm.. code it can't understand enough to give meaningful debug messages (ie. where the {}s are misformed)?
- Next, I haven't noticed any effect with changing the case of the function names.. what version of things are you running?
I might get the nightly version of both at some point...
I get the same results as you for 6. and 7.
- For your 4 points..
Quote: It causes the host application to crash if you have a syntax error.
I hate to suggest this, but the reload hack means that.. it might.. just possibly.. be an error on your part? :/
Quote: It doesn't expose functions to the COM interface.
It must do sometimes, as it was working quitely on mine (for a while) (I promise)... no idea on the conditions though, yet.
Quote: It seems confused about whether functions are upper or lower-case.
Not afaict...
Quote: It generates multiple error messages when arguments are missing.
This is possibly a limitation (bug) in the php interpreter.
Terminal excerpt:
C:\php>php testg.php
PHP Warning: Missing argument 1 for test() in C:\php\testg.php on line 2
Warning: Missing argument 1 for test() in C:\php\testg.php on line 2
PHP Warning: Missing argument 2 for test() in C:\php\testg.php on line 2
Warning: Missing argument 2 for test() in C:\php\testg.php on line 2
PHP Warning: Missing argument 3 for test() in C:\php\testg.php on line 2
Warning: Missing argument 3 for test() in C:\php\testg.php on line 2
testg.php being:
<?
function test($a, $b, $c)
{
echo $a . $b . $c;
}
test();
Ie. it is actually generating plenty of error messages. To fix this, it'd be a specific case in activeState, or a re-write of the php parser, neither of which sounds particularily tempting.
Another option is, I suppose.. you could "cache" the error messages until they stop comming in, and then display them in one dialog (assuming the source (to the line number) was the same)?
- And, just out of interest.. what's the difference between (faked xml (hope you get what I mean), so bare with me):
This:
<aliases>
<alias
script="randsoul"
match="^randsoul (.*)$"
enabled="y"
regexp="y"
sequence="100"
>
</alias>
</aliases>
and this?:
<aliases>
<alias
match="^randsoul(.+)$"
enabled="y"
echo_alias="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>randsoul("no idea what these args are..",
"no idea what these args are..",
array("%1","%2","%3 ...etc...."));
</send>
</alias>
</aliases>
And, I can promise you that variants aren't being handled correctly :) Any ideas what functions/methods/values this class has on it, so (if I get it running again) I can call them?
Faux
*prays that she got the forum codes right*
edits: Trying to spot typos in tags. |
Faux, from Discworld. Feel free to come talk to me =)
http://faux.servebeer.com/ | Top |
|