tophe 69 Posted March 10, 2007 I have just made my very first SQF script. The script will get a unit to patrol a small area. To do that I will have to add <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">var = execVM "patrolscript.sqf" To the initline of the patroling unit. If I don't use a variable I will get an error (i.e. execVM "..." So... what is it for? What can I do with that variable? Why do I have to run it that way? Share this post Link to post Share on other sites
KaRRiLLioN 0 Posted March 10, 2007 If I'm not mistaken, you could use that var to call the script on other items. For example: call compile var would exec the script. If you have a variable to pass into the script, then I think you'd do like: [arguments] call compile var. I've never used it this way, but I'm pretty sure that's what it's used for. Share this post Link to post Share on other sites
benreeper 0 Posted March 10, 2007 You can also tell when the script has finished by using that var. --Ben Share this post Link to post Share on other sites
crashdome 3 Posted March 10, 2007 Ben is correct. That var is a return value of the execVM command which allows you to detect when it has finished executing. Share this post Link to post Share on other sites