[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  what does this error mean?
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

what does this error mean?

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


Posted by Mushclientuser   (8 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] top

Posted by Mushclientuser   (8 posts)  [Biography] 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 =)
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] 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.


3,661 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]