JacobJ 10 Posted June 5, 2011 Hey Instead of making this line for every vehicle I have in my base, what can I do instead? nul = [truck1,'all','all',FALSE,1,12,5] execVM "crateFiller.sqf"}; Can I maybe do this: nul = [(truck1, truck2, truck3),'all','all',FALSE,1,12,5] execVM "crateFiller.sqf"}; Or how does this works? /Jacob Share this post Link to post Share on other sites
giallustio 757 Posted June 5, 2011 I have to see the script but u can do something like that: {nul = [_x,"all","all",FALSE,1,12,5] execVM "crateFiller.sqf";} foreach [truck1,truck2,truck3]; It should work :) Share this post Link to post Share on other sites
JacobJ 10 Posted June 5, 2011 (edited) //Til våben switch (paramsarray select 4) do { case 1: {nul = [mhq1_ammobox,'all','all',FALSE,15,50,15] execVM "crateFiller.sqf"; nul = [mhq1_ammobox1,'all','all',FALSE,15,50,15] execVM "crateFiller.sqf"}; case 2: {nul = [mhq1_ammobox,'all','all',FALSE,5,12,10] execVM "crateFiller.sqf"; nul = [mhq1_ammobox1,'all','all',FALSE,5,12,10] execVM "crateFiller.sqf"}; case 3: {nul = [mhq1_ammobox,'all','all',FALSE,1,12,5] execVM "crateFiller.sqf"; nul = [mhq1_ammobox1,'all','all',FALSE,1,12,5] execVM "crateFiller.sqf"}; case 4: {nul = [mhq1_ammobox,'all','all',true,99,99,99] execVM "crateFiller.sqf"; nul = [mhq1_ammobox1,'all','all',true,99,99,99] execVM "crateFiller.sqf"}; case 5: {nul = [mhq1_ammobox,'all','all',FALSE,1,12,5] execVM "crateFiller.sqf"; nul = [mhq1_ammobox1,'all','all',FALSE,1,12,5] execVM "crateFiller.sqf"; {nul = [_x,"all","all",FALSE,1,12,5] execVM "crateFiller.sqf";} foreach [we1,we2]}; case 6: {nul = [mhq1_ammobox,'all','all',FALSE,5,12,10] execVM "crateFiller.sqf"; nul = [mhq1_ammobox1,'all','all',FALSE,5,12,10] execVM "crateFiller.sqf"; {nul = [_x,"all","all",FALSE,5,12,10] execVM "crateFiller.sqf";} foreach [we1,we2]}; }; Isnt that done right? It doesnt work. ---------- Post added at 11:42 ---------- Previous post was at 11:16 ---------- Okay I found the problem. It all worked just as it should, thank you very much! The problem was, that I had a waitUntil at the start of description and I tried it out before the compiling got down to these weapons options. I moved the waituntil to the buttom and now it works as it should. Edited June 5, 2011 by JacobJ Share this post Link to post Share on other sites