Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Bug reports
➜ phpscript bug
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Dntc2008
(1 post) Bio
|
| Date
| Sun 18 Dec 2005 07:22 AM (UTC) |
| Message
| I get an error When I use this Script:
<aliases>
<alias
enabled="y"
match="eat (.+)"
regexp="y"
script="test"
sequence="100"
>
</alias>
</aliases>
<script>
<![CDATA[
function test($name, $line, $wildcards)
{
$world->Note($wildcards[0]);
}
]]>
</script>
error description:
Uncaught exception 'com_exception' with message 'index out of bounds' in fragment:3
Stack trace:
#0 fragment(3): variant->test()
#1 [internal function]: test(Object(variant), Object(variant), Object(variant))
#2 {main}
thrown
And I find the type of $name, $line, $wildcards all is object
BUG? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sun 18 Dec 2005 07:27 AM (UTC) |
| Message
| The first wildcard is 1, that is why it is out of bounds.
Use this:
function test($name, $line, $wildcards)
{
$world->Note($wildcards[1]);
}
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
9,712 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top