SA-MP Forums Archive
Stupid error, Please help (Rep+) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Stupid error, Please help (Rep+) (/showthread.php?tid=304716)



Stupid error, Please help (Rep+) - seanny - 19.12.2011

Hello, I am getting this error

Код:
C:\Users\Shaun\Desktop\LSC-RP\gamemodes\san-rp.pwn(1523) : error 008: must be a constant expression;
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
pawn Код:
new PedSkins[176] = {
    {299},  {3},//The Error is here
    {4},    {5},
    {6},    {7},
    {8},    {10},
    {42},   {65},
    {86},   {119},
    {149},  {208},
    {273},  {289},
    {101},  {12},
    {13},   {14},
    {15},   {151},
    {156},  {168},
    {170},  {182},
    {54},   {183},
    {184},  {75},
    {19},   {216},
    {20},   {206},
    {210},  {214},
    {215},  {221},
    {225},  {226},
    {223},  {231},
    {228},  {234},
    {76},   {235},
    {236},  {89},
    {88},   {218},
    {240},  {250},
    {261},  {40},
    {41},   {35},
    {37},   {38},
    {36},   {44},
    {43},   {46},
    {9},    {93},
    {39},   {48},
    {47},   {262},
    {229},  {58},
    {59},   {60},
    {232},  {233},
    {67},   {7},
    {72},   {55},
    {94},   {95},
    {98},   {56},
    {128},  {129},
    {130},  {131},
    {132},  {133},
    {157},  {158},
    {159},  {160},
    {196},  {197},
    {198},  {199},
    {161},  {162},
    {200},  {201},
    {202},  {31},
    {32},   {33},
    {34},   {138},
    {139},  {140},
    {145},  {146},
    {154},  {251},
    {92},   {97},
    {45},   {18},
    {258},  {259},
    {26},   {51},
    {52},   {80},
    {81},   {23},
    {96},   {99},
    {11},   {148},
    {153},  {167},
    {68},   {171},
    {172},  {179},
    {189},  {155},
    {205},  {209},
    {217},  {211},
    {219},  {260},
    {16},   {27},
    {264},  {70},
    {152},  {178},
    {237},  {238},
    {243},  {244},
    {207},  {245},
    {246},  {85},
    {256},  {257},
    {64},   {63},
    {87},   {90},
    {192},  {193},
    {194},  {134},
    {135},  {137},
    {181},  {213},
    {212},  {230},
    {239},  {249},
    {241},  {242},
    {29},   {49},
    {50},   {57},
    {62},   {66},
    {73},   {77},
    {78},   {79},
    {82},   {83},
    {84}
};



Re: Stupid error, Please help (Rep+) - Dark_Kostas - 19.12.2011

new PedSkins[176][1] or (better do the 2nd) leave it as it is now and change your values like that.

{1, 2, 3, 4, 5}; instead of {1}, {2}, {3};


AW: Stupid error, Please help (Rep+) - Drebin - 19.12.2011

pawn Код:
new PedSkins[176] = {
    299,  3,
    4,    5,
    6,    7,
    8,    10,
    42,   65,
    86,   119,
    149,  208,
    273,  289,
    101,  12,
    13,   14,
    15,   151,
    156,  168,
    170,  182,
    54,   183,
    184,  75,
    19,   216,
    20,   206,
    210,  214,
    215,  221,
    225,  226,
    223,  231,
    228,  234,
    76,   235,
    236,  89,
    88,   218,
    240,  250,
    261,  40,
    41,   35,
    37,   38,
    36,   44,
    43,   46,
    9,    93,
    39,   48,
    47,   262,
    229,  58,
    59,   60,
    232,  233,
    67,   7,
    72,   55,
    94,   95,
    98,   56,
    128,  129,
    130,  131,
    132,  133,
    157,  158,
    159,  160,
    196,  197,
    198,  199,
    161,  162,
    200,  201,
    202,  31,
    32,   33,
    34,   138,
    139,  140,
    145,  146,
    154,  251,
    92,   97,
    45,   18,
    258,  259,
    26,   51,
    52,   80,
    81,   23,
    96,   99,
    11,   148,
    153,  167,
    68,   171,
    172,  179,
    189,  155,
    205,  209,
    217,  211,
    219,  260,
    16,   27,
    264,  70,
    152,  178,
    237,  238,
    243,  244,
    207,  245,
    246,  85,
    256,  257,
    64,   63,
    87,   90,
    192,  193,
    194,  134,
    135,  137,
    181,  213,
    212,  230,
    239,  249,
    241,  242,
    29,   49,
    50,   57,
    62,   66,
    73,   77,
    78,   79,
    82,   83,
    84
};



Re: Stupid error, Please help (Rep+) - suhrab_mujeeb - 19.12.2011

So now u can distinct between stupid and genius errors? I didn't know 0.3d had that feature too.


Re: Stupid error, Please help (Rep+) - seanny - 19.12.2011

None of them work.


Re: Stupid error, Please help (Rep+) - Tee - 19.12.2011

pawn Код:
new PedSkins[176] =
{
    299,  3,
    4,    5,
    6,    7,
    8,    10,
    42,   65,
    86,   119,
    149,  208,
    273,  289,
    101,  12,
    13,   14,
    15,   151,
    156,  168,
    170,  182,
    54,   183,
    184,  75,
    19,   216,
    20,   206,
    210,  214,
    215,  221,
    225,  226,
    223,  231,
    228,  234,
    76,   235,
    236,  89,
    88,   218,
    240,  250,
    261,  40,
    41,   35,
    37,   38,
    36,   44,
    43,   46,
    9,    93,
    39,   48,
    47,   262,
    229,  58,
    59,   60,
    232,  233,
    67,   7,
    72,   55,
    94,   95,
    98,   56,
    128,  129,
    130,  131,
    132,  133,
    157,  158,
    159,  160,
    196,  197,
    198,  199,
    161,  162,
    200,  201,
    202,  31,
    32,   33,
    34,   138,
    139,  140,
    145,  146,
    154,  251,
    92,   97,
    45,   18,
    258,  259,
    26,   51,
    52,   80,
    81,   23,
    96,   99,
    11,   148,
    153,  167,
    68,   171,
    172,  179,
    189,  155,
    205,  209,
    217,  211,
    219,  260,
    16,   27,
    264,  70,
    152,  178,
    237,  238,
    243,  244,
    207,  245,
    246,  85,
    256,  257,
    64,   63,
    87,   90,
    192,  193,
    194,  134,
    135,  137,
    181,  213,
    212,  230,
    239,  249,
    241,  242,
    29,   49,
    50,   57,
    62,   66,
    73,   77,
    78,   79,
    82,   83,
    84,
 
};



Re: Stupid error, Please help (Rep+) - Dark_Kostas - 19.12.2011

Quote:
Originally Posted by Tee
Посмотреть сообщение
pawn Код:
new PedSkins[176] =
{
    299,  3,
    4,    5,
    6,    7,
    8,    10,
    42,   65,
    86,   119,
    149,  208,
    273,  289,
    101,  12,
    13,   14,
    15,   151,
    156,  168,
    170,  182,
    54,   183,
    184,  75,
    19,   216,
    20,   206,
    210,  214,
    215,  221,
    225,  226,
    223,  231,
    228,  234,
    76,   235,
    236,  89,
    88,   218,
    240,  250,
    261,  40,
    41,   35,
    37,   38,
    36,   44,
    43,   46,
    9,    93,
    39,   48,
    47,   262,
    229,  58,
    59,   60,
    232,  233,
    67,   7,
    72,   55,
    94,   95,
    98,   56,
    128,  129,
    130,  131,
    132,  133,
    157,  158,
    159,  160,
    196,  197,
    198,  199,
    161,  162,
    200,  201,
    202,  31,
    32,   33,
    34,   138,
    139,  140,
    145,  146,
    154,  251,
    92,   97,
    45,   18,
    258,  259,
    26,   51,
    52,   80,
    81,   23,
    96,   99,
    11,   148,
    153,  167,
    68,   171,
    172,  179,
    189,  155,
    205,  209,
    217,  211,
    219,  260,
    16,   27,
    264,  70,
    152,  178,
    237,  238,
    243,  244,
    207,  245,
    246,  85,
    256,  257,
    64,   63,
    87,   90,
    192,  193,
    194,  134,
    135,  137,
    181,  213,
    212,  230,
    239,  249,
    241,  242,
    29,   49,
    50,   57,
    62,   66,
    73,   77,
    78,   79,
    82,   83,
    84,
 
};
You shouldn't use comma at the last one. Also its the same as Drebin provided and i said.


Re: Stupid error, Please help (Rep+) - seanny - 19.12.2011

It does not work!!!!


Re: Stupid error, Please help (Rep+) - Dark_Kostas - 19.12.2011

Quote:
Originally Posted by seanny
Посмотреть сообщение
It does not work!!!!
Is the compiler crashing? Is your computer restarting? Is the earth jumping up and down? TELL US WHAT DOESN'T WORK and what errors do you get.


Re: Stupid error, Please help (Rep+) - DjSterios - 19.12.2011

Give us the code of these lines: 1520 -1525