Jump to content
Sign in to follow this  
iceman11a

invalid number in expression

Recommended Posts

Why would the line below cause a error of "invalid number in expression"

Bomb = “SH_120_HE†createVehicle [(getPos S1 select 0),(getPos S1 select 1),50];

I'm trying to get a bomb to drop on a truck.

Share this post


Link to post
Share on other sites

Because your createVehicle command is munged.

http://community.bistudio.com/wiki/createVehicle_array

The class you want to create is the first argument you give to createVehicle, so it goes after, not before.

---------- Post added at 09:19 PM ---------- Previous post was at 09:18 PM ----------

bomb = createVehicle ["SH_120_HE", [getPos S1 select 0, getPos S1 select 1,50],[], "none"];

---------- Post added at 09:21 PM ---------- Previous post was at 09:19 PM ----------

Also, spawning it 50 above is going to make quite a long delay before it hits, and it's always possible it might miss - I don't know how the arty shell you are using works in free fall without a forward vector.

Share this post


Link to post
Share on other sites

Thanks Tank, It just it looks like My Murray is going to have to update his doc's since that's what I been going by. Thanks for the code.

UPDATE, Sorry Tank that errored out too. It says

Only 4 elements expected 5.

---------- Post added at 03:54 PM ---------- Previous post was at 03:45 PM ----------

How ever this works,

bomb = createVehicle ["SH_120_HE", [getPos S1 select 0, getPos S1 select 1,50],[], 0, "none"];

Edited by iceman11a

Share this post


Link to post
Share on other sites

That Mr Murray guide is quite old. He's referring to the old createVehicle command, it's better to use the createVehicle Array command I link to earlier.

Share this post


Link to post
Share on other sites

Yes I did. Is there a newer guide that will help me, Some thing I can down load and read threw it.

Share this post


Link to post
Share on other sites
Yeah, there's a couple here that are much newer. I can't personally vouch for any of them, so try them and see what happens.

http://www.armaholic.com/list.php?c=arma2_files_editing_references

Since there's more then one. Can you tell me witch one to get. some thing just like Mr-Murray pdf file. Some thing that uses most of the common script commands and some good stuff. ?

Share this post


Link to post
Share on other sites

Hard to say - I've not used either, though the first one gets a good write up.

Share this post


Link to post
Share on other sites

The only thing is that the 1st 2 or 3 manuals are for ArmA 2, Not Arma. Armed Assault.

The scripts commands are not the same, So some one uploaded them to the wrong place. I need some thing for Arma

Share this post


Link to post
Share on other sites

Yes I know and none of them were very helpful..

---------- Post added at 06:31 PM ---------- Previous post was at 05:13 PM ----------

I'll have to post again, I ran into another problem. I'll explain and post some code too. I'll really screwed up on this.

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  

×