BLSmith2112 0 Posted April 13, 2007 An example of an init I have in a mission: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> [a1,"Sh_122_HE",0] exec "explos2.sqs"; [a2,"Sh_122_HE",0] exec "explos2.sqs"; [a3,"Sh_122_HE",0] exec "explos2.sqs"; [a4,"Sh_122_HE",0] exec "explos2.sqs"; [a5,"Sh_122_HE",0] exec "explos2.sqs"; [a6,"Sh_122_HE",0] exec "explos2.sqs"; [a7,"Sh_122_HE",0] exec "explos2.sqs"; [a8,"Sh_122_HE",0] exec "explos2.sqs"; [a9,"Sh_122_HE",0] exec "explos2.sqs"; [a10,"Sh_122_HE",0] exec "explos2.sqs"; [a11,"Sh_122_HE",0] exec "explos2.sqs"; [a12,"Sh_122_HE",0] exec "explos2.sqs"; Is there anyway to perhaps say [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, ,"Sh_122_HE",0] exec "explos2.sqs"? I hate changing all those lines for code for 1 change. Share this post Link to post Share on other sites
squeeze 22 Posted April 13, 2007 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_list = [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12]; {[_x,"Sh_122_HE",0] exec "explos2.sqs";}foreach _list; Share this post Link to post Share on other sites
Chris Death 0 Posted April 14, 2007 or: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{[_x,"Sh_122_HE",0] exec "explos2.sqs"} forEach [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12] ~S~ CD Share this post Link to post Share on other sites
ArmaVidz 0 Posted April 14, 2007 ~nice thanks for the examples! Share this post Link to post Share on other sites
BLSmith2112 0 Posted April 14, 2007 So I could just throw those into an init field and it'll work? Whoaza! Rock on thanks. Share this post Link to post Share on other sites