Jump to content
  • 0

How to use magazineCargo


Meowzors

Question

I am trying to check a crate for a certain number of an item....

 

i tried this...

_playerName = name player;   //line 7
_mags=magazineCargo Crate;   //line 8
_weps=weaponCargo Crate;     //line 9
_OreQTY={_x == "PartOre"} count _mags;
_PoleQTY={_x == "ItemPole"} count _mags;
...

which results in this error....

_mags=magazineCargo Crate;
_weps=weaponCargo Crate>
  Error position: <Crate;
_weps=weaponCargo Crate>
  Error Missing ;
File mpmissions\__CUR_MP.Tavi\custom\finish_build.sqf, line 8

Can anyone tell me whats going on here??? There are no missing ; as far as I can see here...

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

the missing semi colon in the RPT points to line 8... line 8 is:

 

_mags=magazineCargo Crate;

 

a semi colon inside of the count _mags is not needed ( i did however try putting one there when I originally had all my lines with "count magazoneCargo Crate"--still said missing ; )

Link to comment
Share on other sites

  • 0

https://community.bistudio.com/wiki/magazineCargo

 

magazineCargo is arma 3 only

 

u need to use the following

 

https://community.bistudio.com/wiki/getMagazineCargo

_OreQTY={
if(_x == "PartOre")then{
_mags select 1 select forEachIndex;
};
} 
forEach_mags select 0;
_PoleQTY={
if(_x == "ItemPole")then{
_mags select 1 select forEachIndex;
};
}
forEach _mags select 0;
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...