Raised This Month: $ Target: $400
 0% 

Solved How can i fix this Array index is out of bounds? :/


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Walgrim
AlliedModders Donor
Join Date: Dec 2015
Location: France
Old 11-12-2017 , 08:57   Re: How can i fix this Array index is out of bounds? :/
Reply With Quote #4

Not sure but, here you use a String.
PHP Code:
new String:rank[64];
SB_GetChatRank(authorranksizeof(rank));  // Line 999 
And here a char, why? I mean, why not just using a string too?
PHP Code:
public void Function_GetRank3(int rankchar[] stringint maxlength
{
    
char sRank[64];
    
Format(sRanksizeof(sRank), "%s"Ranks[rank][tagRank]); // Line 949
    
strcopy(stringmaxlengthsRank);
}


public 
int Native_GetChatRank(Handle pluginint numParams)
{
    
int client GetNativeCell(1);
    
    
char rank[64], status[8];
    
GetClientCookie(clientgH_sChatTagstatussizeof(status));
    if (!
StrEqual(status"off"false))
    {
        
Function_GetRank3(Function_GetRankNumber(client), ranksizeof(rank)); //Line 999
        
SetNativeString(2rankGetNativeCell(3), false);
    }
    else
    {
        
SetNativeString(2""GetNativeCell(3), false);
    }

I'm not sure about that for real, maybe I say some stupid things
__________________
Walgrim is offline
 



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 21:09.


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