Raised This Month: $ Target: $400
 0% 

MOTD Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nnajko
Senior Member
Join Date: May 2009
Location: Sweden
Old 07-12-2010 , 12:20   MOTD Help
Reply With Quote #1

Hello guys, I got a MOTD error in one of my plugins. Im trying to create a motd with tables but something is going wrong.
My problem is that the motd doesnt show

Here is the code:

Code:
public MOTD(id)
{    
    static szHelpText[1120], len;
    
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len, "<html>");
    
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len, "<style type = ^"text/css^">");
    
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len, "body");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len, "{");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len,    "background-color:#000000;");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len,    "font-family:Comic Sans MS;");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len,    "font-weight:bold;");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len, "}");
    
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len, "h1");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len, "{");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len,    "color:#FFFFFF;");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len,    "font-size:x-small;");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len, "}");
    
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len,"</style>");
    
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len, "<body>");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len, "<div align = ^"center^">");    
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len,"<table>");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len,"<tr>");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len,"<h1>");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len,"<th>Title Test:</th>");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len,"</tr>");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len,"<tr>");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len,"<tr><td>TEST:</td><td>TEST2</td><td>TEST3</td><td>TEST4</td></tr>");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len,"</h1>");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len,"</tr>");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len,"</table>");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len, "</div>");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len, "</body>");
    len += format(szHelpText[len], sizeof(szHelpText) - 1 - len,"</html>");    
    
    show_motd(id, szHelpText, "INFO");
    
    return PLUGIN_HANDLED
}
And here is the part where the motd is called, in my mainmenu:

Code:
        case 1: 
        { 
            MOTD(id);
            MainMenu(id);
        }

Last edited by nnajko; 07-12-2010 at 14:13.
nnajko is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-12-2010 , 17:51   Re: MOTD Help
Reply With Quote #2

First make sure the function MOTD(id) is actually being called at all. Then, if it is I would try just doing a single word and see of the MOTD shows with that single word.
__________________
fysiks is offline
nnajko
Senior Member
Join Date: May 2009
Location: Sweden
Old 07-13-2010 , 22:09   Re: MOTD Help
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
First make sure the function MOTD(id) is actually being called at all. Then, if it is I would try just doing a single word and see of the MOTD shows with that single word.
Well it works now, but not as I wan't it, so i'll just try to rescipt it. Thanks for you're help
nnajko is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:06.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode