Jump to content
pedeathtrian

How does scheduling work?

Recommended Posts

private = makes the variables given to it availiable to all scopes in current script/function (except for spawn I think).

 

params = Defines arguments to use in script/function.

  • Like 1

Share this post


Link to post
Share on other sites

Okay can someone better elaborate the differences between params and private?

Params is better used in a script/function that takes input values (parameters), private is better used when (austin's explanation is better). I believe that params also privatizes those variables, so you don't have to params it then private the same variables.

Share this post


Link to post
Share on other sites

I have a tendancy to make ALL my scripts into functions. and Treat them like procedures using cfgFunctions.hpp ensures they're pre-compiled always at mission start.

Share this post


Link to post
Share on other sites

private = makes the variables given to it availiable to all scopes in current script/function (except for spawn I think).

Not only it makes some variables available in the scope, it also masquarades variables of outer scopes with given names, making them inaccessible in current scope.

See also: Private Variables in ARMA 3 SQF.

Share this post


Link to post
Share on other sites

Thank you, code34.

 

BIS_fnc_codePerformance  has little to do with profiling, really. Measuring -- yes, but not profiling (at least for how I understand performance profiling). You can't use it to get distribution of consumed time between different commands in some code. You can't detect a bottleneck with it.

 

diag_*Frame  commands are very close, but I see no indication (from biki pages or other sources) that it can profile SQF code. I also don't see whether it can be used to get info for longer period of time than rendering one frame. Will try it myself and see.

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

×