SA-MP Forums Archive
Tag Mismatch Error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Tag Mismatch Error (/showthread.php?tid=587340)



Tag Mismatch Error - JessThompson - 30.08.2015

Hello does anyone know how to fix this error am getting

lcrp1.pwn(63233) : error 035: argument type mismatch (argument 1)

Код:
  			if(listitem == 0) // Bikes
  		    {
				for (new i; i < sizeof(DScarBuy); i++)
				{
					if (DScarBuy[i][DSVehicleClass] == 9)
					{
					    new FirstCar[10];
						format(FirstCar, sizeof(FirstCar), "%i", DScarBuy[0][DSCarModel]);
						new spawnedcar = CreateVehicle(FirstCar, 488.0754, -420.3091, 2757.9961, 358.6074, 1, 1, -1, 0);
						PutPlayerInVehicle(playerid, spawnedcar, 0);
						TogglePlayerControllable(playerid,0);
						if(prc_Moving[playerid] == false) // Check whether the camera is already set.
						{
							prc_Degree[playerid] = 0; // Reseting the variable
							prc_Timer[playerid] = SetTimerEx("MoveCamera", 75, true, "d", playerid); // Setting the timer
							prc_Moving[playerid] = true; // okay, now we're going to activate the moving variable
						}
					}
				}
The line the error is on is

Код:
format(FirstCar, sizeof(FirstCar), "%i", DScarBuy[0][DSCarModel]); // line 63233



Re: Tag Mismatch Error - X337 - 30.08.2015

Change :
Код:
new spawnedcar = CreateVehicle(FirstCar, 488.0754, -420.3091, 2757.9961, 358.6074, 1, 1, -1, 0);
To
Код:
new spawnedcar = CreateVehicle(strval(FirstCar), 488.0754, -420.3091, 2757.9961, 358.6074, 1, 1, -1, 0);
Take a look at this : https://sampwiki.blast.hk/wiki/CreateVehicle
The first argument on CreateVehicle must be an integer