Register forum user name Search FAQ

Gammon Forum

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.
 Entire forum ➜ MUSHclient ➜ Lua ➜ what does this error mean?

what does this error mean?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Mushclientuser   (8 posts)  Bio
Date Tue 01 Nov 2005 11:48 PM (UTC)
Message
Error number: 0
Event: Run-time error
Description: [string "Trigger: "]:2: bad argument #2 to `EnableTrigger' (number expected, got nil)
stack traceback:
[C]: in function `EnableTrigger'
[string "Trigger: "]:2: in main chunk
Called by: Immediate execution
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 02 Nov 2005 05:17 AM (UTC)
Message
Can you paste the script code that caused this error please? And which version of MUSHclient are you using?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #2 on Wed 02 Nov 2005 05:21 AM (UTC)

Amended on Wed 02 Nov 2005 05:33 AM (UTC) by Nick Gammon

Message
The documentation states the 2nd argument should be true or false, and defaults to true.


http://www.gammon.com.au/scripts/doc.php?function=EnableTrigger


This works for me:


EnableTrigger "mytrigger"

EnableTrigger ("mytrigger", true)

EnableTrigger ("mytrigger", false)


However this gives that error message:


EnableTrigger ("mytrigger", nil)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #3 on Wed 02 Nov 2005 05:34 AM (UTC)
Message
See the release notes for version 3.68 - it has been changed to allow nil to be explicitly provided, and still take the default:


http://www.gammon.com.au/scripts/showrelnote.php?version=3.68&productid=0


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Mushclientuser   (8 posts)  Bio
Date Reply #4 on Wed 02 Nov 2005 08:49 AM (UTC)
Message
thanks thanks
i found out the reason why
i had it as EnableTrigger("mytrigger", True)
caps on the word True...

thanks =)
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #5 on Wed 02 Nov 2005 10:22 AM (UTC)
Message
Ah, ok. That would do it, as True would be undefined and thus nil. Oh well, you found a subtle bug in MUSHclient anyway, although you need to be careful, as using True and False will have unintended effects if you misspell them like that.

- 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.


18,001 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.