Jump to content
Sign in to follow this  
Nicolai

multiple parameters

Recommended Posts

Hello all,

I'm using a script by [ZSU]Blake that allows enemy and friendly ai to use artillery. My question is that if you want to call a function with multiple parameters, can you leave some empty and if so, how does the computer know that you have skipped one and it should be the default value?

for example:

to call the script in it's most default form, you put this in the init line

null = [This,"Markername"] execVM "artytrig.sqf"

but there are more optional parameters like dispersion and the name of the battery. So a full line would be:

null = [This,"arty area",artillery, 3, 100, 20, 5, "SoldierWB", 10000, 10000 ] execVM "artytrig.sqf";

Is there any way to leave one of those parameters open? perhaps just

null =  [value, value, empty, value] call blablabla

Thanks in advance!

Nicolai

Share this post


Link to post
Share on other sites

If you know for a fact that the script you're sending parameters to doesn't throw up on not getting that parameter, you could send nil (replaces "empty").

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  

×