error 029: invalid expression, assumed zero
#1

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}};
Reply
#2

Quote:
Originally Posted by ******
Посмотреть сообщение
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.
Reply
#3

It's a one dimensional array.
Also you should not put numbers between { } .
:
PHP код:
new Peds[93] = {
01271014151618202324252627282931323334353638394143,
444546495051525354555860626364666869727377788184878992,
9597100101128129131133134140151153155162167170178181183196200202206,
210212217221225229230234241242248254260262291299
}; 
Reply
#4

Quote:
Originally Posted by ThePhenix
Посмотреть сообщение
It's a one dimensional array.
Also you should not put numbers between { } .
:
PHP код:
new Peds[93] = {
01271014151618202324252627282931323334353638394143,
444546495051525354555860626364666869727377788184878992,
9597100101128129131133134140151153155162167170178181183196200202206,
210212217221225229230234241242248254260262291299
}; 
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
Код:
};
Reply
#5

ThePhenix is actually correct.
pawn Код:
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.

Quote:
Originally Posted by darkdave
Посмотреть сообщение
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.
Reply
#6

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 https://sampwiki.blast.hk/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)