PDA

View Full Version : error 029: invalid expression, assumed zero


darkdave
08/08/2013, 01:56 PM
I received this error: (1374) : error 029: invalid expression, assumed zero
Line 1374 is : new Peds[93][1] = {


//================================================== ================================================== ================================================== =======
// = Peds
//================================================== ================================================== ================================================== =======
new Peds[93][1] = {
{0}, {1}, {2}, {7}, {10}, {14}, {15}, {16}, {18}, {20}, {23}, {24}, {25}, {26}, {27}, {28}, {29}, {31}, {32}, {33}, {34}, {35}, {36}, {38}, {39}, {41}, {43},
{44}, {45}, {46}, {49}, {50}, {51}, {52}, {53}, {54}, {55}, {58}, {60}, {62}, {63}, {64}, {66}, {68}, {69}, {72}, {73}, {77}, {78}, {81}, {84}, {87}, {89}, {92},
{95}, {97}, {100}, {101}, {128}, {129}, {131}, {133}, {134}, {140}, {151}, {153}, {155}, {162}, {167}, {170}, {178}, {181}, {183}, {196}, {200}, {202}, {206},
{210}, {212}, {217}, {221}, {225}, {229}, {230}, {234}, {241}, {242}, {248}, {254}, {260}, {262}, {291}, {299}};

darkdave
08/08/2013, 02:39 PM
This is your second topic asking about a compiler error. Have you considered reading the compiler documentation tosee what they all mean?

I am novice problem? Ask here is that I tried in several ways and fail to get rid of this error if I try other methods other errors occur.This topic was made for questions not to criticize, do not deserve the level of Beta Tester! Sorry for my bad english , i dont speak english.

ThePhenix
08/08/2013, 02:49 PM
It's a one dimensional array.
Also you should not put numbers between { } .
:
new Peds[93] = {
0, 1, 2, 7, 10, 14, 15, 16, 18, 20, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 38, 39, 41, 43,
44, 45, 46, 49, 50, 51, 52, 53, 54, 55, 58, 60, 62, 63, 64, 66, 68, 69, 72, 73, 77, 78, 81, 84, 87, 89, 92,
95, 97, 100, 101, 128, 129, 131, 133, 134, 140, 151, 153, 155, 162, 167, 170, 178, 181, 183, 196, 200, 202, 206,
210, 212, 217, 221, 225, 229, 230, 234, 241, 242, 248, 254, 260, 262, 291, 299
};

darkdave
08/08/2013, 03:02 PM
It's a one dimensional array.
Also you should not put numbers between { } .
:
new Peds[93] = {
0, 1, 2, 7, 10, 14, 15, 16, 18, 20, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 38, 39, 41, 43,
44, 45, 46, 49, 50, 51, 52, 53, 54, 55, 58, 60, 62, 63, 64, 66, 68, 69, 72, 73, 77, 78, 81, 84, 87, 89, 92,
95, 97, 100, 101, 128, 129, 131, 133, 134, 140, 151, 153, 155, 162, 167, 170, 178, 181, 183, 196, 200, 202, 206,
210, 212, 217, 221, 225, 229, 230, 234, 241, 242, 248, 254, 260, 262, 291, 299
};

I tried your solution and I got these two errors:
error 029: invalid expression, assumed zero for this line new Peds[93] = {
error 010: invalid function or declaration for this line };

Konstantinos
08/08/2013, 03:15 PM
ThePhenix is actually correct.

new Peds[ 93 ] =
{
0, 1, 2, 7, 10, 14, 15, 16, 18, 20, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 38, 39, 41, 43,
44, 45, 46, 49, 50, 51, 52, 53, 54, 55, 58, 60, 62, 63, 64, 66, 68, 69, 72, 73, 77, 78, 81, 84, 87, 89, 92,
95, 97, 100, 101, 128, 129, 131, 133, 134, 140, 151, 153, 155, 162, 167, 170, 178, 181, 183, 196, 200, 202, 206,
210, 212, 217, 221, 225, 229, 230, 234, 241, 242, 248, 254, 260, 262, 291, 299
};


It compiles fine.

This topic was made for questions not to criticize, do not deserve the level of Beta Tester!
One topic is just fine, creating multiply topics about the same problem spams the forum.

iJumbo
08/08/2013, 03:46 PM
Im sure you can learn what is an array, how to use, how many dimensions have and the difference between array and enum...

you can start read the compiler documentation and search before posting for other errors like your.

You can check too the wiki http://wiki.sa-mp.com/