SA-MP Forums Archive
Truck 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: Truck error (/showthread.php?tid=434951)



Truck error - DerickClark - 04.05.2013

i try to add a truck.gave me errors.


Vehicle_AddStatic(515,-524.57,-473.22,26.54,177.82,0,0); //Roadtrain



Код:
warning 202: number of arguments does not match definition



Re: Truck error - [MG]Dimi - 04.05.2013

show us define of Vehicle_AddStatic


Re: Truck error - DerickClark - 04.05.2013

Код:
Vehicle_AddStatic(vModel, Float:vX, Float:vY, Float:vZ, Float:vRotation, vC1, vC2, vSpawnDelay)
{
	// Create a new static vehicle during GameModeInit
	new vid = AddStaticVehicleEx(vModel, vX, vY, vZ, vRotation, vC1, vC2, vSpawnDelay);
	// Save the vehicle-model
    AVehicleData[vid][Model] = vModel;
	// Set the fuel to maximum so the vehicle can be used
    AVehicleData[vid][Fuel] = MaxFuel;
	// Save the colors
    AVehicleData[vid][Color1] = vC1;
    AVehicleData[vid][Color2] = vC2;
	// Set this vehicle as a static vehicle
	AVehicleData[vid][StaticVehicle] = true;

	return vid;
}



Re: Truck error - XStormiest - 04.05.2013

that's because the function have 8 parameters , but you have only 7
YOu miss vc2, anad Spawn delay
Код:
Vehicle_AddStatic(515,-524.57,-473.22,26.54,177.82,0,0,-1); //Roadtrain



Re: Truck error - DerickClark - 04.05.2013

Oh Thanks.