#1

pawn Код:
new Float:racecheckpoints[MAX_RACE_POINTS][3] = {
{2689.6077,7.8846,29.0976},
{247.7123,2709.5881,-68.4964,42.3547}, // This is the error line
{172.1774,2698.4766,-120.2895,40.4814},
{165.2426,2670.4746,-274.8298,38.0951},
{168.7722,2633.1824,-357.0745,56.7126},
{124.6473,2534.6597,-387.6919,77.8981},
{98.3893,2506.4368,-512.0436,91.7697},
{160.7962,2464.3237,-566.2908,103.4512},
{133.3040,2401.5923,-632.4051,125.3707},
{158.1865,2361.4365,-650.6663,127.6728}
};
After compiling:
Код:
C:\Documents and Settings\*******\Desktop\Sanchez offroad race.pwn(273) : error 018: initialization data exceeds declared size
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Help me!!
Reply
#2

Quote:
Originally Posted by Klutty
pawn Код:
new Float:racecheckpoints[MAX_RACE_POINTS][3] = { //Your declaring 3 columns
{2689.6077,7.8846,29.0976}, //here you use only 3
{247.7123,2709.5881,-68.4964,42.3547}, // from here on out you use 4 data columns......
{172.1774,2698.4766,-120.2895,40.4814},
{165.2426,2670.4746,-274.8298,38.0951},
{168.7722,2633.1824,-357.0745,56.7126},
{124.6473,2534.6597,-387.6919,77.8981},
{98.3893,2506.4368,-512.0436,91.7697},
{160.7962,2464.3237,-566.2908,103.4512},
{133.3040,2401.5923,-632.4051,125.3707},
{158.1865,2361.4365,-650.6663,127.6728}
};
After compiling:
Код:
C:\Documents and Settings\*******\Desktop\Sanchez offroad race.pwn(273) : error 018: initialization data exceeds declared size
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Help me!!
Reply
#3

pawn Код:
new Float:racecheckpoints[MAX_RACE_POINTS][6] = {
{2689.6077,7.8846,29.0976,247.7123,2709.5881,-68.4964},
{172.1774,2698.4766,-120.2895,165.2426,2670.4746,-274.8298},
{168.7722,2633.1824,-357.0745,124.6473,2534.6597,-387.6919},
{98.3893,2506.4368,-512.0436,160.7962,2464.3237,-566.2908},
{133.3040,2401.5923,-632.4051,158.1865,2361.4365,-650.6663},
};
I think that would give what you're after... Not sure.
Reply
#4

Quote:
Originally Posted by IntrozeN
pawn Код:
new Float:racecheckpoints[MAX_RACE_POINTS][6] = {
{2689.6077,7.8846,29.0976,247.7123,2709.5881,-68.4964},
{172.1774,2698.4766,-120.2895,165.2426,2670.4746,-274.8298},
{168.7722,2633.1824,-357.0745,124.6473,2534.6597,-387.6919},
{98.3893,2506.4368,-512.0436,160.7962,2464.3237,-566.2908},
{133.3040,2401.5923,-632.4051,158.1865,2361.4365,-650.6663},
};
I think that would give what you're after... Not sure.
Umm not, you just took x, y, z something that one line needs to do in that array, and combined them, so tell me how when he goes to pull the data from one line with 3 data columns (hence X,Y,Z) and get the last half of the sentence for the next checkpoint?

What he needs to do is remove the facing angle from the lines, and leave the rest alone, after his first line in the array he is storing x, y, z, a.... not just x, y, z.....
Reply
#5

cyper_punk's first answer helped me, thank you!
Reply
#6

Glad it helped, Happy scripting!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)