Jump to content
Sign in to follow this  
killer12

Simple addAction Help

Recommended Posts

Hello everyone! I've been trying to make a Crop Dusting Script, but i've encountered a simple, yet annoying problem; I can't figure out how to get this addAction working.

cropdust = player addAction["Release Insecticide",{
if (typeOf(vehicle player) == "I_Truck_02_covered_F") then
{
	if (player distance (getMarkerPos "crop_1") < 200) then {
			hint "Keep dusting the crops until the insecticide is empty";
			_smoke = "SmokeShell" createVehicle position player;
			crop_smokeActive = true;
			} else {
		hint "You need to be less than 200m to the Crop Field to deploy the insecticide!";
	};
}:	
}];

I've been looking here: https://community.bistudio.com/wiki/addAction

But i still can't figure it out :L

Any help would be appreciated! :)

Share this post


Link to post
Share on other sites

The closing brace on your outer if statement ends with a ":" not a ";" :D.

Share this post


Link to post
Share on other sites
The closing brace on your outer if statement ends with a ":" not a ";" :D.

Oh god, how'd i miss that! aha. Thank you!!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×