Jump to content
Sign in to follow this  
Searing_heat

Addmagazinecargo

Recommended Posts

Hey I am fairly new to the editing scene, i have made a few very basic missions.

Today i have encountered what i thought was a relatively simple problem, I was attempting to load '30Rnd_65x39_caseless_green' into the cargo of a supply box (I have removed all existing cargo from the box prior to this), and encountered this error message:

addmagazinecargo: Type Any, Expected object

The code I used to get this was:

this addmagazinecargo ("30Rnd_65x39_caseless_green");

I tried adding a number to the end of this too:

this addmagazinecargo ("30Rnd_65x39_caseless_green",10);

However then I get a error message saying:

Missing )

("30Rnd_65x39_caseless_green"[#],10);

Im fairly certain this is a simple fix but forgive me... im new. :)

Share this post


Link to post
Share on other sites

You're using parenthesis () which is used for evaluation instead of brackets [], used for arrays.

Share this post


Link to post
Share on other sites

In fact I think that the font used in the editor makes it a bit hard sometimes to distiguished these two different characters. I recommend (and I'm surely not the only one) to use a text editor like Notepad++. I write my code there and copy it to the init line or whatever in the editor.

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  

×