OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Robinhansen on 16 Jun 2005, 20:36:50

Title: ClearWeaponCargo
Post by: Robinhansen on 16 Jun 2005, 20:36:50
What the h*** is wrong with this script! Once I execute it, it say's that it don't reconice this line: ClearWeaponCargo and ClearMagazineCargo  ???

Quote
_aa1 = _this select 0
_HeavyReammoBoxEast = _this select 1

_dir= getdir _sup

_x = (((sin _dir) *5) + (getpos _sup select 0))
_y = (((cos _dir) *5) + (getpos _sup select 1))

_ammo = _HeavyReammoBoxEast  createVehicle [_x, _y, 0]

_ammo setdir (_dir +180)


_ammo ClearMagazineCargo this
_ammo addmagazinecargo ["9K32Launcher",10]

hint "ammodepot created"

exit
Title: Re:ClearWeaponCargo
Post by: bedges on 16 Jun 2005, 20:40:30
always check the comref (http://www.ofpec.com/editors/comref.php?letter=C#clearWeaponCargo). ;)
Title: Re:ClearWeaponCargo
Post by: Robinhansen on 16 Jun 2005, 20:53:07
So I actually had to turn the sentence upside down - lol...

Quote
ClearMagazineCargo _ammo