GetPluginInfo Question

Posted by WillFa on Sat 13 Jun 2009 07:32 AM — 3 posts, 17,209 views.

USA #0
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?
Netherlands #1
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.
Amended on Sat 13 Jun 2009 09:05 AM by Worstje
Australia Forum Administrator #2
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.