[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]  Plugins
. . -> [Subject]  GetPluginInfo Question
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

GetPluginInfo Question

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


Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Sat 13 Jun 2009 07:32 AM (UTC)
Message
What's the point of GetPluginInfo( id , 7 ) ?

You have that value already, because you pass it in as the first parameter to GetPluginInfo.


Or is there something subtle and tricky going on that I haven't realized?
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #1 on Sat 13 Jun 2009 09:03 AM (UTC)

Amended on Sat 13 Jun 2009 09:05 AM (UTC) by Worstje

Message
Heh, funny find! :)

The only use I can imagine is checking whether or not a plugin is installed since it will return nil in that case... but IsPluginInstalled() does that in a way more logical sense.

Either way, it is quite amusing.

Edit: I reckon Nick implemented it while holding the struct with plugin information right next to him, and logically the plugin ID is one of many fields part of that structure. While mass-producing return values like those, you easily miss such a simple oversight.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Sun 14 Jun 2009 09:21 PM (UTC)
Message
Worstje is right, I would have just quickly returned everything in the structure. It will, of course, always return the ID you supplied, if the plugin exists.

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


4,168 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]