Raised This Month: $12 Target: $400
 3% 

I can't get top15 working properly


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sibox
Member
Join Date: Apr 2009
Location: Bulgaria
Old 01-13-2011 , 14:11   I can't get top15 working properly
Reply With Quote #1

Code:
public show_top15up(id) {     new i, count;     static sort[33][2], maxPlayers;     if(!maxPlayers) maxPlayers = get_maxplayers();     for(i=1;i<=maxPlayers;i++)     {         sort[count][0] = i;         sort[count][1] = PlayerMoney[i];         count++;     }     new MotdChars[1024], iLen     iLen += formatex(MotdChars[iLen], (charsmax(MotdChars) ) - iLen, STYLE)     iLen += formatex(MotdChars[iLen], (charsmax(MotdChars) ) - iLen, "<body><h2>Players Info</h2> <table width=100%% border=0 align=center cellpadding=0 cellspacing=1>")     iLen += formatex(MotdChars[iLen], (charsmax(MotdChars) ) - iLen, "<body><tr><th>#<th>Name<th>Money</tr>" )     new b = clamp(count,0,15)     new name[32], player     for(new a=0;a<b; a++) {         player = sort[a][0]                 get_user_name(player, name, 31)                 iLen += formatex(MotdChars[iLen], (charsmax(MotdChars) ) - iLen,"<tr><td> %d <td> %s <td> %d </tr>", a+1, name, sort[a][1])     }     iLen += formatex(MotdChars[iLen], (charsmax(MotdChars) ) - iLen, "</table>" )     show_motd(id, MotdChars, "Push The Button Top 15")         return PLUGIN_CONTINUE }
And i get this See Pictures
Attached Thumbnails
Click image for larger version

Name:	bug.JPG
Views:	142
Size:	30.7 KB
ID:	80673  
sibox is offline
Send a message via Skype™ to sibox
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-13-2011 , 14:49   Re: I can't get top15 working properly
Reply With Quote #2

Code:
    iLen += formatex(MotdChars[iLen], (charsmax(MotdChars) ) - iLen, "<body><h2>Players Info</h2> <table width=100%% border=0 align=center cellpadding=0 cellspacing=1>")     iLen += formatex(MotdChars[iLen], (charsmax(MotdChars) ) - iLen, "<body><tr><th>#<th>Name<th>Money</tr>" )

You have 2 body tags.
Also, the top data is never sorted.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
sibox
Member
Join Date: Apr 2009
Location: Bulgaria
Old 01-13-2011 , 16:07   Re: I can't get top15 working properly
Reply With Quote #3

But why I'm getting so much numbers. I want only 1 name 2900 without other number that are on pictures is it bug with <tags> ?
sibox is offline
Send a message via Skype™ to sibox
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-13-2011 , 16:49   Re: I can't get top15 working properly
Reply With Quote #4

Did you test after changing what I pointed out?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
sibox
Member
Join Date: Apr 2009
Location: Bulgaria
Old 01-15-2011 , 12:56   Re: I can't get top15 working properly
Reply With Quote #5

Thanks Exolent
sibox is offline
Send a message via Skype™ to sibox
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 18:55.


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