[debug] Run time error 4: "Array index out of bounds"
#5

Quote:
Originally Posted by Mencent
Посмотреть сообщение
Hello!

Try this:
PHP код:
forward LoadGraffiti();
public 
LoadGraffiti()
{
    new 
CacheResult mysql_query(mysql"SELECT * FROM `graffiti` ORDER BY `graffiti`.`ID` ASC");
    new 
graff 0xresult[256], tagname[1000];
     for(new 
icache_get_row_count (); != j; ++i)
    {
        
graff ++;
           
cache_get_field_content(i"ID"result); strval(result); GraffitiInfo[i][gfID] = x//that is line 15464
           
cache_get_field_content(i"X"result); GraffitiInfo[i][gfX] = floatstr(result);
           
cache_get_field_content(i"Y"result); GraffitiInfo[i][gfY] = floatstr(result);
         
cache_get_field_content(i"Z"result); GraffitiInfo[i][gfZ] = floatstr(result);
          
cache_get_field_content(i"Rot"result); GraffitiInfo[i][gfRot] = floatstr(result);
           
cache_get_field_content(i"Owned"result); GraffitiInfo[i][gfOwned] = strval(result);
        
GraffitiInfo[i][gfObject] = CreateDynamicObject(19373GraffitiInfo[i][gfX], GraffitiInfo[i][gfY], GraffitiInfo[i][gfZ], 0.00.0GraffitiInfo[i][gfRot]);
        
//GraffitiInfo[i][gfObject] = CreateDynamicObject(19482, GraffitiInfo[i][gfX], GraffitiInfo[i][gfY], GraffitiInfo[i][gfZ], 0.0, 0.0, GraffitiInfo[i][gfRot]);
        
if(GraffitiInfo[i][gfOwned] == tagname "None";
        else 
format(tagnamesizeof(tagname), "{%s}%s \n %s"ClanInfo[GraffitiInfo[i][gfOwned]][Color], ClanInfo[GraffitiInfo[i][gfOwned]][Name] ,ClanInfo[GraffitiInfo[i][gfOwned]][Tag]);
        
SetDynamicObjectMaterialText(GraffitiInfo[i][gfObject], 0tagnameOBJECT_MATERIAL_SIZE_512x512"BankGothic Md BT"6010xfff0f0f001);
    }
    
printf("[Graffiti Script]: %d graffiti loaded."graff);
    
cache_delete(Result);
    return 
1;

Thx, now working, but can you tell me what was wrong?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)