What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Help in C. how to...

Help in C. how to...
Author: Message:
crank
Full Member
***

Avatar
Failed to come back here :(

Posts: 304
Reputation: 17
35 / Male / Flag
Joined: Mar 2004
Status: Away
O.P. Undecided  Help in C. how to...
I'm making a plug-in for the moment but i've got a problem...
It must be simple but I can't find my mistake.
PLEASE HELP!

code:
MPPLUGIN_RETURN_BOOL PublishInfo(/*[out]*/ char *sPluginName,
                                 /*[out]*/ PLUGIN_PUBLISH_LIST* aCommands,
                                 /*[out]*/ PLUGIN_PUBLISH_LIST* aTags)
{
    //Copy the name of the plugin
    strcpy(sPluginName, "EXAMPLE");

    //Set the commands help
    aCommands->nCount = 1;
    strcpy(aCommands->sName[0], "EXAMPLE");
    strcpy(aCommands->sValue[0], "xEXAMPLE");
    strcpy(aCommands->sHelp[0], "EXAMPLE.");
   
    //Set the tags help
    aTags->nCount = 2;
    strcpy(aTags->sName[0], "example");
    strcpy(aTags->sValue[0], "(!xexample)");
   
    //Set the tags help
    aTags->nCount = 2;
    strcpy(aTags->sName[0], "example1");
    strcpy(aTags->sValue[0], "(!xexample1)");

    return TRUE;
}


That code should show a menu.
It does but it only shows:
code:
EXAMPLE
------------
example1

--> It doesn't show the 'example' Tag. I tried to change the nCount Value but it doesn't help. Can anyone help me with this???

Edit: I had an idea I'm trying it now, but if you have a solution please PM me.
I tried this:
code:
    //Set the tags help
    aTags->nCount = 2;
    strcpy(aTags->sName[0], "QT hello");
    strcpy(aTags->sValue[0], "(!XQThello)");
    strcpy(aTags->sName[1], "QT insult");
    strcpy(aTags->sValue[1], "(!XQTinsult)");
Still doesn't work!

This post was edited on 05-30-2004 at 09:20 AM by crank.
I haven't been active here in ages.
If you're wondering who i am, read my reputations. I used to make plugins, skins and spam the IRC channels here back in the good old days before Windows Live.
05-30-2004 09:15 AM
Profile E-Mail PM Web Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
RE: Help in C. how to...
sName, sValue...etc are arrays, you should increase the array index when assigning different values to different array elements :)

code:
MPPLUGIN_RETURN_BOOL PublishInfo(/*[out]*/ char *sPluginName,
                                 /*[out]*/ PLUGIN_PUBLISH_LIST* aCommands,
                                 /*[out]*/ PLUGIN_PUBLISH_LIST* aTags)
{
    //Copy the name of the plugin
    strcpy(sPluginName, "EXAMPLE");

    //Set the commands help
    aCommands->nCount = 1;
    strcpy(aCommands->sName[0], "EXAMPLE");
    strcpy(aCommands->sValue[0], "xEXAMPLE");
    strcpy(aCommands->sHelp[0], "EXAMPLE.");
   
    //Set the tags help
    aTags->nCount = 2;
    strcpy(aTags->sName[0], "example");
    strcpy(aTags->sValue[0], "(!xexample)");
   
    strcpy(aTags->sName[1], "example1");
    strcpy(aTags->sValue[1], "(!xexample1)");

    return TRUE;
}

05-30-2004 09:18 AM
Profile PM Web Find Quote Report
crank
Full Member
***

Avatar
Failed to come back here :(

Posts: 304
Reputation: 17
35 / Male / Flag
Joined: Mar 2004
Status: Away
O.P. RE: Help in C. how to...
quote:
Originally posted by Mnjul
sName, sValue...etc are arrays, you should increase the array index when assigning different values to different array elements :)


Thanks...
Do I need to change this to??
code:
if(strcmp(sTag, "(!XQThello)") == 0)
->
code:
if(strcmp(sTag, "(!XQThello)") == 1)

EDIT:
Well it worked without changing this so thanks!

This post was edited on 05-30-2004 at 09:28 AM by crank.
I haven't been active here in ages.
If you're wondering who i am, read my reputations. I used to make plugins, skins and spam the IRC channels here back in the good old days before Windows Live.
05-30-2004 09:23 AM
Profile E-Mail PM Web Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
RE: Help in C. how to...
The return value of strcmp:
quote:
Originally posted by MSDN Library

The return value for each of these functions indicates the lexicographic relation of string1 to string2.

Value Relationship of string1 to string2
< 0 string1 less than string2
0 string1 identical to string2
> 0 string1 greater than string2

05-30-2004 09:38 AM
Profile PM Web Find Quote Report
crank
Full Member
***

Avatar
Failed to come back here :(

Posts: 304
Reputation: 17
35 / Male / Flag
Joined: Mar 2004
Status: Away
O.P. RE: Help in C. how to...
Thank you guys but I'm currently having another problem.
I'm wondering how to make Text formatting work.
Ow yeah and is there a way to use the sContactName to output the contacts name in a message??? I tried several ways but nothing worked.

The last one is my biggest isue...
I haven't been active here in ages.
If you're wondering who i am, read my reputations. I used to make plugins, skins and spam the IRC channels here back in the good old days before Windows Live.
05-30-2004 02:56 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On