Raised This Month: $ Target: $400
 0% 

get user name


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 06-18-2017 , 10:16   get user name
Reply With Quote #1

Hi, i have some bugs with this script so can tell me what is wroung?

Script to get user name, red line is the problem in logs
PHP Code:
stock get_user_name_ex(id)
{
    new 
szName[33];
    
get_user_name(idszNamecharsmax(szName));

    
replace_all(szNamecharsmax(szName), "'""\'");
    
replace_all(szNamecharsmax(szName), "^"", "\^"");
    
replace_all(szNamecharsmax(szName), ".""");
    
    return 
szName;

Line Error in Log (1842)
Quote:
replace_all(szName, charsmax(szName), "'", "\'");
Log:
Quote:
L 06/18/2017 - 113:03: replace() buffer not big enough (12>=11)
L 06/18/2017 - 113:03: [AMXX] Displaying debug trace (plugin "gunxpmod.amxx", version "4.3.5")
L 06/18/2017 - 113:03: [AMXX] Run time error 10: native error (native "replace")
L 06/18/2017 - 113:03: [AMXX] [0] string.inc::replace_all (line 340)
L 06/18/2017 - 113:03: [AMXX] [1] gunxpmod.sma::get_user_name_ex (line 1842)
L 06/18/2017 - 113:03: [AMXX] [2] gunxpmod.sma::check_level (line 881)
L 06/18/2017 - 113:03: [AMXX] [3] gunxpmod.sma::native_set_user_xp (line 1757)
L 06/18/2017 - 113:03: Unhandled dynamic native error
__________________

Last edited by D3XT3R; 06-18-2017 at 10:19.
D3XT3R is offline
Send a message via Skype™ to D3XT3R
 



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 22:44.


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