Tag Mismatch.
#1

Hi.

I get the Tag Mismatch warning with this:

Код:
	PutPlayerInVehicle(playerid, derbycars[randDerby][0], 0);
Any reason why? (Im noob at scripting xD)

E/

Whole thingy:

Код:
  new randDerby = random(sizeof(derbycars));
Код:
new Float:derbycars[15][4] = {
{-1362.9799,932.8219,1036.0580,9.0890}, // 0
{-1346.4526,935.4996,1036.0889,13.6811}, // 1
{-1335.6995,938.2600,1036.1177,16.8043}, // 2
{-1320.8756,944.9904,1036.2062,27.0307}, // 3
{-1306.8385,953.5919,1036.3212,37.8366}, // 4
{-1353.9670,934.0486,1036.2421,11.5836}, // 5
{-1328.6377,941.0197,1036.3208,18.9670}, // 6
{-1313.9012,948.6513,1036.4198,29.5596}, // 7
{-1501.0956,960.3203,1036.9474,313.0457}, // 8
{-1506.8105,968.1082,1037.0840,304.3027}, // 9
{-1513.0317,976.8713,1037.2457,301.9500}, // 10
{-1516.0858,988.2343,1037.4362,274.5044}, // 11
{-1517.6569,995.6628,1037.5626,272.2782}, // 12
{-1515.1127,1004.8807,1037.6969,262.3869}, // 13
{-1510.7020,1014.6202,1037.8568,249.1825} // 14
};
Reply
#2

Quote:
Originally Posted by Seif_
derbycars is a variable of coordinates, it's not cars.
Huh? But if I go to my server, I see those cars :S?

So you think I should change it to? AddStaticVehicle, CreateVehicle?
Reply
#3

pawn Код:
new Float:derbycars[][] = {
{-1362.9799,932.8219,1036.0580,9.0890}, // 0
{-1346.4526,935.4996,1036.0889,13.6811}, // 1
{-1335.6995,938.2600,1036.1177,16.8043}, // 2
{-1320.8756,944.9904,1036.2062,27.0307}, // 3
{-1306.8385,953.5919,1036.3212,37.8366}, // 4
{-1353.9670,934.0486,1036.2421,11.5836}, // 5
{-1328.6377,941.0197,1036.3208,18.9670}, // 6
{-1313.9012,948.6513,1036.4198,29.5596}, // 7
{-1501.0956,960.3203,1036.9474,313.0457}, // 8
{-1506.8105,968.1082,1037.0840,304.3027}, // 9
{-1513.0317,976.8713,1037.2457,301.9500}, // 10
{-1516.0858,988.2343,1037.4362,274.5044}, // 11
{-1517.6569,995.6628,1037.5626,272.2782}, // 12
{-1515.1127,1004.8807,1037.6969,262.3869}, // 13
{-1510.7020,1014.6202,1037.8568,249.1825} // 14
};

to create it ... ( put this on OnGameModeInit or Fsinit... )

pawn Код:
for(new j = 0;j<sizeof(derbycars);j++){
AddStaticVehicle(yourvehiclemodel,derbycars[j][0],derbycars[j][1],derbycars[j][2],derbycars[j][3],color1,color2); // Choose Colors and Model by yourself...
}

and he means that PutPlayerInvehicle needs an Integer Value not an Floating Point Value , that is the Error and cause it does Missmatch.
Reply
#4

@BlackFox, I get this:

Код:
error 032: array index out of bounds (variable "derbycars")
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)