error 032: array index out of bounds (variable "gInfo")
#4

idk if you're stupid ors, but what the hell are you scripting.

PHP код:
enum groupData
{
    
gID,
    
gName[30],
    
gType,
    
gRank1[30],
    
gRank2[30],
    
gRank3[30],
    
gRank4[30],
    
gRank5[30],
    
gRank6[30],
    
gRank7[30],
    
gSlots
}
new 
gInfo[MAX_FACTIONS][groupData];
public 
OnGameModeInit(){
    
mysql_tquery(mysql,"SELECT * FROM groups","LoadGroups","");
    return 
1;
}
forward LoadGroups();
public 
LoadGroups(){
    new 
rows=cache_num_rows();
    if(!
rows)return print("No groups added!");
    for(new 
irowsi++){ //uses this 'cache_get_field_content' for strings and this 'cache_get_field_content_int' for numbers
        
gInfo[i][gID] = cache_get_field_content_int(i"ID");
        
cache_get_field_content(i,"groupName",gInfo[i][gName],mysql,30);
        
gInfo[i][gType] = cache_get_field_content_int(i"groupType");
        
gInfo[i][gSlots] = cache_get_field_content_int(i"groupSlots");
        
        
cache_get_field_content(i,"groupRank1",gInfo[i][gRank1],mysql,30);
        
cache_get_field_content(i,"groupRank2",gInfo[i][gRank2],mysql,30);
        
cache_get_field_content(i,"groupRank3",gInfo[i][gRank3],mysql,30);
        
cache_get_field_content(i,"groupRank4",gInfo[i][gRank4],mysql,30);
        
cache_get_field_content(i,"groupRank5",gInfo[i][gRank5],mysql,30);
        
cache_get_field_content(i,"groupRank6",gInfo[i][gRank6],mysql,30);
        
cache_get_field_content(i,"groupRank7",gInfo[i][gRank7],mysql,30);
    }
    
printf("%d groups loaded.",rows);
    return 
1;

Reply


Messages In This Thread
error 032: array index out of bounds (variable "gInfo") - by danielpalade - 09.01.2016, 22:05
Re: error 032: array index out of bounds (variable "gInfo") - by danielpalade - 09.01.2016, 23:41
Re: error 032: array index out of bounds (variable "gInfo") - by danielpalade - 10.01.2016, 15:05
Re: error 032: array index out of bounds (variable "gInfo") - by CodeStyle175 - 10.01.2016, 15:20
Re: error 032: array index out of bounds (variable "gInfo") - by OwlIT - 10.01.2016, 15:29

Forum Jump:


Users browsing this thread: 3 Guest(s)