View Single Post
marcelowzd
Senior Member
Join Date: Feb 2011
Location: São Paulo, Brazil
Old 06-09-2019 , 21:28   Re: Chat Manager [Admin Prefix & Color Chat]
Reply With Quote #114

Hi, i think i found a bug. When i type just %s, the following happens

Code:
L 06/09/2019 - 22:23:13: String formatted incorrectly - parameter 4 (total 3)
L 06/09/2019 - 22:23:13: [AMXX] Displaying debug trace (plugin "crx_chatmanager.amxx", version "4.4")
L 06/09/2019 - 22:23:13: [AMXX] Run time error 25: parameter error 
L 06/09/2019 - 22:23:13: [AMXX]    [0] cromchat.inc::CC_SendMatched (line 264)
L 06/09/2019 - 22:23:13: [AMXX]    [1] crx_chatmanager.sma::Hook_Say (line 742)
This was also happening in an older version that I was using. It was actually what made me update but it still happens.

Temporary fix
PHP Code:
//Inside hook_say

static szArgs[WRITTEN_MESSAGE_SIZE]
read_args(szArgscharsmax(szArgs)); remove_quotes(szArgs)

replace_allszArgscharsmaxszArgs ), "%s""" );
replace_allszArgscharsmaxszArgs ), "%i""" );
replace_allszArgscharsmaxszArgs ), "%d""" );

CC_RemoveColors(szArgscharsmax(szArgs)) 
__________________

Last edited by marcelowzd; 06-09-2019 at 22:12. Reason: Added temp fix
marcelowzd is offline