Raised This Month: $ Target: $400
 0% 

String formatted incorrectly - parameter 4 (total 3)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gamer99
Senior Member
Join Date: Jul 2011
Old 07-15-2011 , 00:55   String formatted incorrectly - parameter 4 (total 3)
Reply With Quote #1

while formating

format(sArgvAll,127,sArgvAll[1])

I am getting this error ...what could be the possible reason ?

the full errot is given below .


L 07/14/2011 - 19:055: String formatted incorrectly - parameter 4 (total 3)
L 07/14/2011 - 19:055: [AMXX] Displaying debug trace (plugin "alias.amxx")
L 07/14/2011 - 19:055: [AMXX] Run time error 25: parameter error
L 07/14/2011 - 19:055: [AMXX] [0] TP_aim.sma::client_command (line 64)
L 07/14/2011 - 20:05:45: Start of error session.
gamer99 is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 07-15-2011 , 01:05   Re: String formatted incorrectly - parameter 4 (total 3)
Reply With Quote #2

Quote:
Originally Posted by gamer99 View Post
while formating

format(sArgvAll,127,sArgvAll[1])

I am getting this error ...what could be the possible reason ?

the full errot is given below .


L 07/14/2011 - 19:055: String formatted incorrectly - parameter 4 (total 3)
L 07/14/2011 - 19:055: [AMXX] Displaying debug trace (plugin "alias.amxx")
L 07/14/2011 - 19:055: [AMXX] Run time error 25: parameter error
L 07/14/2011 - 19:055: [AMXX] [0] TP_aim.sma::client_command (line 64)
L 07/14/2011 - 20:05:45: Start of error session.
Show the code of plugin
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-15-2011 , 01:18   Re: String formatted incorrectly - parameter 4 (total 3)
Reply With Quote #3

Use copy() for that.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
gamer99
Senior Member
Join Date: Jul 2011
Old 07-15-2011 , 02:05   Re: String formatted incorrectly - parameter 4 (total 3)
Reply With Quote #4

it is inside client_command
Quote:

if(equal(sArgv,"say")||equal(sArgv,"say_team" ))
{
new iMessages=get_pcvar_num(g_dCvarMessages)
if(iMessages > 0)
{
new sArgv[64],sArgvAll[128],sBuffer[64],sBanReason[64],dLen
new dArgc=read_argc()

for(new i=1;i<dArgc;i++)
{
read_argv(i,sArgv,63)
format(sArgvAll,127,"%s %s",sArgvAll,sArgv)
}

format(sArgvAll,127,sArgvAll[1])

new dSize=ArraySize(g_sMessages)

for(new i;i<dSize;i++)
{
ArrayGetString(g_sMessages,i,sBuffer,63)

dLen=strlen(sBuffer)

if(sBuffer[0]=='['&&sBuffer[dLen-1]==']')
{
format(sBanReason,dLen-2,sBuffer[1])
continue
}
else
{
if(containi(sArgvAll,sBuffer)!=-1)
{
if(g_dPlayerStatus[id]==true)
{
//ban messages

new iBanTime=get_pcvar_num(g_dCvarMessagesBanTime )
ban(id,iMessages,sBanReason,iBanTime)

}
return PLUGIN_HANDLED
}
}
}
}
}
gamer99 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-15-2011 , 09:16   Re: String formatted incorrectly - parameter 4 (total 3)
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
Use copy() for that.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
gamer99
Senior Member
Join Date: Jul 2011
Old 07-15-2011 , 11:45   Re: String formatted incorrectly - parameter 4 (total 3)
Reply With Quote #6

can u show me how to ue copy() ? i never used it
gamer99 is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 07-15-2011 , 11:47   Re: String formatted incorrectly - parameter 4 (total 3)
Reply With Quote #7

http://www.amxmodx.org/funcwiki.php?go=func&id=55
Erox902 is offline
gamer99
Senior Member
Join Date: Jul 2011
Old 07-15-2011 , 17:40   Re: String formatted incorrectly - parameter 4 (total 3)
Reply With Quote #8

thanks Exolent[jNr] and Erox902 the problem got resolved
gamer99 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 00:46.


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