new Items[][] = { {400,520,100,"Landstalker",15}, {424,520,100,"BF Injection",17}, {412,530,100,"Voodoo",23}, {534,530,100,"Remington",34} };
format(number, sizeof(number),"ID: %d Name: %s Level: %d", Items[idx][0], Items[idx][3], Items[idx][4]); SendClientMessage(playerid, COLOR_GREEN, number);
"ID: 400 Name: Landstalker Level 97" "ID: 424 Name: BF Injection Level 70" "ID: 412 Name: Voodoo Level 111" "ID: 534 Name: Remington Level 101"
new Items[][][] =
{
{400, 520, 100, "Landstalker", 15},
{424, 520, 100, "BF Injection", 17},
{412, 530, 100, "Voodoo", 23},
{534, 530, 100, "Remington", 34}
};
error 018: initialization data exceeds declared size error 052: multi-dimensional arrays must be fully initialized
#define MAX_ITEMS 50
enum iInfo
{
ID,
Name[32],
Level
};
new Items[MAX_ITEMS][iInfo];
format(number, sizeof(number),"ID: %d Name: %s Level: %d", Items[idx][ID], Items[idx][Name], Items[idx][Level]);
SendClientMessage(playerid, COLOR_GREEN, number);
new Items[][][] = { /////////////Weapons////////////// //////////Furniture////////////////// {1745,4,10,"Bed",0}, {2025,4,10,"Dresser",0}, {2815,4,10,"Rug",0}, {2566,4,10,"Bed",0}, {1828,4,10,"Rug",0}, {2306,4,10,"Table",0}, {1795,4,10,"Bed",0}, {2205,4,10,"Desk",0}, {2133,4,10,"Dresser",0}, {2134,4,10,"Dresser",0}, {1726,4,10,"Couch",0}, {1727,4,10,"chair",0}, {2311,4,10,"Table",0}, {2099,4,10,"Stereo",0}, {2309,4,10,"Chair",0}, {2565,4,10,"Bed",0}, {2295,4,10,"Chair",0}, /////////////Cars/////////////// //Saloons// {401,510,100,"Bravura",0}, {405,510,100,"Sentinel",0}, //Offroad// {400,520,100,"Landstalker",0}, {424,520,100,"BF Injection",0}, //Lowriders// {412,530,100,"Voodoo",0}, {534,530,100,"Remington",0}, //Sport Cars// {402,540,100,"Buffalo",0}, {411,540,100,"Infernus",0}, //Industrials// {413,550,100,"Pony",0}, {414,550,100,"Mule",0}, //Bikes// {481,560,30,"BMX",5,19941,0,1327,692,0,0,0,0,0,0,0,0,25,0,2,10,0,0,0,0,0,0,0,0}, {509,560,30,"Bike",5,19941,0,1327,692,0,0,0,0,0,0,0,0,25,0,2,10,0,0,0,0,0,0,0,0}, {510,560,30,"Mountain Bike",5,19941,0,1327,692,0,0,0,0,0,0,0,0,25,0,2,10,0,0,0,0,0,0,0,0}, {448,560,80,"Pizzaboy",8,19941,19917,1327,692,0,0,0,0,0,0,0,0,30,1,2,20,0,0,0,0,0,0,0,0}, {461,560,80,"PCJ-600",10,19941,19917,1327,692,0,0,0,0,0,0,0,0,35,1,2,25,0,0,0,0,0,0,0,0}, {462,560,80,"Faggio",8,19941,19917,1327,692,0,0,0,0,0,0,0,0,30,1,2,20,0,0,0,0,0,0,0,0}, {463,560,80,"Freeway",10,19941,19917,1327,692,0,0,0,0,0,0,0,0,35,1,2,25,0,0,0,0,0,0,0,0}, {468,560,80,"Sanchez",10,19941,19917,1327,692,0,0,0,0,0,0,0,0,35,1,2,20,0,0,0,0,0,0,0,0}, {471,560,80,"Quad",15,19941,19917,1327,692,0,0,0,0,0,0,0,0,35,1,2,30,0,0,0,0,0,0,0,0}, {521,560,80,"FCR-900",15,19941,19917,1327,692,0,0,0,0,0,0,0,0,35,1,2,25,0,0,0,0,0,0,0,0}, {522,560,80,"NGR-500",30,19941,19917,1327,692,0,0,0,0,0,0,0,0,35,1,2,35,0,0,0,0,0,0,0,0}, {581,560,80,"BF-400",15,19941,19917,1327,692,0,0,0,0,0,0,0,0,35,1,2,30,0,0,0,0,0,0,0,0}, {586,560,80,"Wayfarer",10,19941,19917,1327,692,0,0,0,0,0,0,0,0,35,1,2,20,0,0,0,0,0,0,0,0}, //Boats// {446,570,100,"Squallo",0}, {452,570,100,"Speeder",0}, //Aircraft// {460,580,100,"Skimmer",0}, {511,580,100,"Beagle",0}, /////////////ETC//////////////// {1650,0,5,"Gas Can",0}, {3409,0,1,"Marijuana",0}, {2216,0,1,"Snack",0} };
{481,560,30,"BMX",5,19941,0,1327,692,0,0,0,0,0,0,0 ,0,25,0,2,10,0,0,0,0,0,0,0,0}, |
{414,550,100,"Mule",0}, |
new Items[][][] =
{
/////////////Weapons//////////////
//////////Furniture//////////////////
{1745,4,10,"Bed",0},
{2025,4,10,"Dresser",0},
{2815,4,10,"Rug",0},
{2566,4,10,"Bed",0},
{1828,4,10,"Rug",0},
{2306,4,10,"Table",0},
{1795,4,10,"Bed",0},
{2205,4,10,"Desk",0},
{2133,4,10,"Dresser",0},
{2134,4,10,"Dresser",0},
{1726,4,10,"Couch",0},
{1727,4,10,"chair",0},
{2311,4,10,"Table",0},
{2099,4,10,"Stereo",0},
{2309,4,10,"Chair",0},
{2565,4,10,"Bed",0},
{2295,4,10,"Chair",0},
/////////////Cars///////////////
//Saloons//
{401,510,100,"Bravura",0},
{405,510,100,"Sentinel",0},
//Offroad//
{400,520,100,"Landstalker",0},
{424,520,100,"BF Injection",0},
//Lowriders//
{412,530,100,"Voodoo",0},
{534,530,100,"Remington",0},
//Sport Cars//
{402,540,100,"Buffalo",0},
{411,540,100,"Infernus",0},
//Industrials//
{413,550,100,"Pony",0},
{414,550,100,"Mule",0},
//Bikes//
//Boats//
{446,570,100,"Squallo",0},
{452,570,100,"Speeder",0},
//Aircraft//
{460,580,100,"Skimmer",0},
{511,580,100,"Beagle",0},
/////////////ETC////////////////
{1650,0,5,"Gas Can",0},
{3409,0,1,"Marijuana",0},
{2216,0,1,"Snack",0}
};
new bikes[][] =
{
{481,560,30,"BMX",5,19941,0,1327,692,0,0,0,0,0,0,0,0,25,0,2,10,0,0,0,0,0,0,0,0},
{509,560,30,"Bike",5,19941,0,1327,692,0,0,0,0,0,0,0,0,25,0,2,10,0,0,0,0,0,0,0,0},
{510,560,30,"Mountain Bike",5,19941,0,1327,692,0,0,0,0,0,0,0,0,25,0,2,10,0,0,0,0,0,0,0,0},
{448,560,80,"Pizzaboy",8,19941,19917,1327,692,0,0,0,0,0,0,0,0,30,1,2,20,0,0,0,0,0,0,0,0},
{461,560,80,"PCJ-600",10,19941,19917,1327,692,0,0,0,0,0,0,0,0,35,1,2,25,0,0,0,0,0,0,0,0},
{462,560,80,"Faggio",8,19941,19917,1327,692,0,0,0,0,0,0,0,0,30,1,2,20,0,0,0,0,0,0,0,0},
{463,560,80,"Freeway",10,19941,19917,1327,692,0,0,0,0,0,0,0,0,35,1,2,25,0,0,0,0,0,0,0,0},
{468,560,80,"Sanchez",10,19941,19917,1327,692,0,0,0,0,0,0,0,0,35,1,2,20,0,0,0,0,0,0,0,0},
{471,560,80,"Quad",15,19941,19917,1327,692,0,0,0,0,0,0,0,0,35,1,2,30,0,0,0,0,0,0,0,0},
{521,560,80,"FCR-900",15,19941,19917,1327,692,0,0,0,0,0,0,0,0,35,1,2,25,0,0,0,0,0,0,0,0},
{522,560,80,"NGR-500",30,19941,19917,1327,692,0,0,0,0,0,0,0,0,35,1,2,35,0,0,0,0,0,0,0,0},
{581,560,80,"BF-400",15,19941,19917,1327,692,0,0,0,0,0,0,0,0,35,1,2,30,0,0,0,0,0,0,0,0},
{586,560,80,"Wayfarer",10,19941,19917,1327,692,0,0,0,0,0,0,0,0,35,1,2,20,0,0,0,0,0,0,0,0}
};
error 033: array must be indexed (variable "Items") error 006: must be assigned to an array
stock GetItemType(itemid) { new type; for(new idx=1; idx< sizeof(Items); idx++) { if(itemid==Items[idx][0]) { type=Items[idx][1]; break; } } return type; }
new type;
for(new idx=1; idx< sizeof(Items); idx++)
{
if(itemid == Items[idx][0][0])
{
type=Items[idx][1][0];
break;
}
}
return type;