problem with variables
#1

why this is working:
Код:
new cars[4][0] = {
{432}, {425}, {520}, {447}
};
and this not working:
Код:
new HouseCost[5][0] = {
{35000000} , {20000000} , {15000000} , {15000000} , {15000000} , {50000000}
};
for the numbers that giving me the error:
error 018: initialization data exceeds declared size

and for the }; that giving me the error:
error 010: invalid function or declaration

what is the problem?
thanks.
Reply
#2

you have 6 house costs not 5 like you have defined it having
Reply
#3

And you don't need to add a 0 sized cell, just do this:

pawn Код:
new HouseCosts[6]={
  35000000,
  20000000,
  15000000,
  15000000,
  15000000,
  50000000
};
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)