I have PhpScript working (to a degree), as I said in another thread.
I'm now trying, however, to get it called from an alias. This is my first time doing this, so it's posisble I'm doing something wrong...
The problem I'm having is that a variant class is being passed. I have no idea how to get the value out of this. I'm rather confused as to why I have it in the first place seeing as a normal variable in php is a variant anyway.
Any suggestions, is this a bug in MUSH, a bug in the activestate implementation (see end for versions), or me being silly?
Background:
Plan (irrelevant):
I want an alias (randsoul) to call this code, and then to send-to-world a value the function generates (which I think should be pretty standard..?).
Alias:
<aliases>
<alias
script="randsoul"
match="^randsoul(.+)$"
enabled="y"
echo_alias="y"
regexp="y"
sequence="100"
>
</alias>
</aliases>
Script file (yes, the entire script file (no <? seems to be accepted)):
function randsoul($alias_name, $alias_output, $wildcards)
{
ob_start();
print_r($alias_name);
$a=ob_get_contents();
$world->Note($a);
}
And this writes:
variant Object
Note:
function randsoul()
{
co... .... ...de();
}
is valid, so it apparently isn't checking the function specifications.
Versions:
PHP 5.03.
php5ts.dll: 5.0.3.3
php5activescript.dll: 5.0.4.4
mushclient.exe: 3.6.3.0
Winxpprosp2, fully up-to-date.
I'm now trying, however, to get it called from an alias. This is my first time doing this, so it's posisble I'm doing something wrong...
The problem I'm having is that a variant class is being passed. I have no idea how to get the value out of this. I'm rather confused as to why I have it in the first place seeing as a normal variable in php is a variant anyway.
Any suggestions, is this a bug in MUSH, a bug in the activestate implementation (see end for versions), or me being silly?
Background:
Plan (irrelevant):
I want an alias (randsoul) to call this code, and then to send-to-world a value the function generates (which I think should be pretty standard..?).
Alias:
<aliases>
<alias
script="randsoul"
match="^randsoul(.+)$"
enabled="y"
echo_alias="y"
regexp="y"
sequence="100"
>
</alias>
</aliases>
Script file (yes, the entire script file (no <? seems to be accepted)):
function randsoul($alias_name, $alias_output, $wildcards)
{
ob_start();
print_r($alias_name);
$a=ob_get_contents();
$world->Note($a);
}
And this writes:
variant Object
Note:
function randsoul()
{
co... .... ...de();
}
is valid, so it apparently isn't checking the function specifications.
Versions:
PHP 5.03.
php5ts.dll: 5.0.3.3
php5activescript.dll: 5.0.4.4
mushclient.exe: 3.6.3.0
Winxpprosp2, fully up-to-date.