Raised This Month: $ Target: $400
 0% 

string error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Adomaz1
Senior Member
Join Date: Feb 2014
Old 03-23-2017 , 13:36   string error
Reply With Quote #1

I get this error:
Code:
String formatted incorrectly - parameter 11 (total 10)
L 03/23/2017 - 19:33:32: [AMXX] Displaying debug trace (plugin "statsx_shell.amxx", version "1.8.3-dev+5067")
L 03/23/2017 - 19:33:32: [AMXX] Run time error 25: parameter error 
L 03/23/2017 - 19:33:32: [AMXX]    [0] statsx_shell.sma::cmdRank (line 1857)
My code:
Code:
public cmdRank(id)
{
	new izStats[8], izBody[8];
	new iRankPos, iRankMax, iRatio;
		
	iRankPos = get_user_stats(id, izStats, izBody)
	iRankMax = get_statsnum()
	iRatio = izStats[STATS_KILLS] - izStats[STATS_DEATHS]
	
	client_print_color(id, id, "%L", id, "YOUR_RANK_IS", iRankPos, iRankMax, izStats[STATS_KILLS], izStats[STATS_DEATHS], iRatio);
	
	return PLUGIN_CONTINUE
}
LANG line:
Code:
YOUR_RANK_IS = ^3* ^1You're ranked ^3%i ^1out of ^3%i players^1. You have ^3%i kill(s)^1, ^3%i death(s) ^1and your ratio is ^3%i^1.
what's the problem here?
Adomaz1 is offline
MspoR
Member
Join Date: Sep 2015
Old 03-23-2017 , 14:07   Re: string error
Reply With Quote #2

Not defined izStats, izBody ?

Last edited by MspoR; 03-23-2017 at 14:07.
MspoR is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 03-23-2017 , 14:53   Re: string error
Reply With Quote #3

There's nothing wrong with your code, just the information because the line 1857 has 5 parameters, not 11.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 03-23-2017 at 14:53.
EFFx is offline
Adomaz1
Senior Member
Join Date: Feb 2014
Old 03-24-2017 , 15:34   Re: string error
Reply With Quote #4

Quote:
Originally Posted by EFFx View Post
There's nothing wrong with your code, just the information because the line 1857 has 5 parameters, not 11.
now I'm confused, how can it be 11 parameters if only 5 are specified?
Adomaz1 is offline
kristi
Senior Member
Join Date: Nov 2016
Old 03-23-2017 , 15:12   Re: string error
Reply With Quote #5

@Adomaz1
Dont change the string formats.
should be:
Code:
YOUR_RANK_IS = ^3* ^1You're ranked ^3%i ^1out of ^3%d players^1. You have ^3%d kill(s)^1, ^3%0.2f death(s) ^1and your ratio is ^3%0.2f%%^1.

Last edited by kristi; 03-23-2017 at 15:37.
kristi is offline
Send a message via Skype™ to kristi
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 03-23-2017 , 15:28   Re: string error
Reply With Quote #6

Yes, they're.

The problem isn't the string format, still with 4 parameters and the error says 11.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
kristi
Senior Member
Join Date: Nov 2016
Old 03-23-2017 , 15:31   Re: string error
Reply With Quote #7

Didn't see that sry.
kristi is offline
Send a message via Skype™ to kristi
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 03-24-2017 , 15:58   Re: string error
Reply With Quote #8

I'm too. Show the source code.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Old 03-24-2017, 16:23
Adomaz1
This message has been deleted by Adomaz1. Reason: doublepost
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 03-24-2017 , 16:24   Re: string error
Reply With Quote #10

lang file might be forked and the plugin takes 2 lines as one

Last edited by jimaway; 03-24-2017 at 16:25.
jimaway 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 18:00.


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