twirly 11 Posted September 26, 2010 (edited) Hi...anyone know the correct syntax for embedding a function in a script? For example I've tried this construct... fnAdd = { private ["_num1","_num2","_num3"]; _num1 = _this select 0; _num2 = _this select 1; _num3 = _num1 + _num2; _num3 }; .....and then later on in the script...... _num = [2,2] call fnAdd; Doesn't work! I've seen it before in lots of code (I think!)....but for the life of me can't seem to open an sqf with what I'm looking for. Still searching though. :confused: Edit: Problem solved! That is the correct code above.....My script was a little more complicated that that. Writing it out there in a simple form actually helped! Hahah...Therepy! Edited September 26, 2010 by twirly Share this post Link to post Share on other sites
thebarricade 7 Posted September 26, 2010 I suppose this won't help you, but your script works for me... Share this post Link to post Share on other sites
twirly 11 Posted September 26, 2010 I suppose this won't help you, but your script works for me... Thanks man....yes it does. I just got it! My script was more complicated and I had an error somewhere. Started over from scratch and bingo!! Been dicking with this for hours. Should have spent more time with the script than looking for the answer! Thanks again. Share this post Link to post Share on other sites
sbsmac 0 Posted September 26, 2010 >My script was more complicated and I had an error somewhere You might find squint useful :) Share this post Link to post Share on other sites
twirly 11 Posted September 27, 2010 You might find squint useful :) Thanks for that man! Share this post Link to post Share on other sites