12.12.2015, 11:51
Hi guys, I have a problem with 2D array. I can't use sizeof because it's 2D array. Array contains male and female skins, so it looks
Here's sizeof. I want to get total number of skins in index 0(male skins)
Sizeof makes these errors
Is here any way for use sizeof on 2D array with undefined 2nd index?
Код:
new const _HRP_Skinovi[2][] = { // MUЉKI SKINOVI { 1, 2, 3, 4, 5, 6, 7, 8, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 32, 33, 34, 35, 36, 37, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 57, 58, 59, 60, 66, 67, 72, 73, 78, 79, 82, 83, 84, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 132, 133, 134, 135, 136, 137, 142, 143, 144, 146, 147, 153, 154, 156, 158, 159, 160, 161, 162, 168, 170, 171, 173, 174, 175, 176, 177, 179, 180, 182, 183, 184, 185, 186, 187, 188, 189, 200, 202, 206, 208, 209, 210, 212, 213, 217, 220, 221, 222, 223, 227, 228, 229, 230, 234, 235, 236, 239, 240, 241, 242, 247, 248, 249, 250, 252, 254, 258, 259, 261, 253, 264, 268, 269, 270, 271, 272, 273, 289, 290, 291, 292, 293, 294, 295, 296, 297, 299, 303, 304, 305 }, // ЋENSKI SKINOVI { 9, 10, 11, 12, 13, 31, 38, 39, 40, 41, 53, 54, 55, 56, 64, 65, 69, 75, 76, 77, 85, 87, 88, 89, 90, 91, 93, 129, 130, 131, 138, 139, 140, 141, 145, 148, 150, 151, 152, 157, 169, 172, 190, 192, 193, 194, 195, 196, 197, 198, 199, 201, 207, 211, 214, 215, 216, 218, 219, 224, 225, 226, 231, 232, 233, 237, 238, 243, 244, 245, 246, 251, 256, 257, 263, 298 } };
Код:
printf("%d aaa", sizeof(_HRP_Skinovi[0]));
Quote:
E:\Silvio\Projekti\Pawn\GameModovi\Od nula\Haswell RolePlay\gamemodes\HRP.pwn(633) : error 001: expected token: "]", but found "-integer value-" E:\Silvio\Projekti\Pawn\GameModovi\Od nula\Haswell RolePlay\gamemodes\HRP.pwn(633) : warning 215: expression has no effect E:\Silvio\Projekti\Pawn\GameModovi\Od nula\Haswell RolePlay\gamemodes\HRP.pwn(633) : error 001: expected token: ";", but found "]" E:\Silvio\Projekti\Pawn\GameModovi\Od nula\Haswell RolePlay\gamemodes\HRP.pwn(633) : error 029: invalid expression, assumed zero E:\Silvio\Projekti\Pawn\GameModovi\Od nula\Haswell RolePlay\gamemodes\HRP.pwn(633) : fatal error 107: too many error messages on one line |