HelloInsomnia 1103 Posted December 12, 2017 Report Share Posted December 12, 2017 Sbm128 asked a great question in another thread and so I wanted to make a video to show some examples as to why you would want to use parameters. 6 Quote Link to post Share on other sites
sbm128 12 Posted December 19, 2017 Report Share Posted December 19, 2017 You rock HelloInsomnia! Thanks for clearing that up, and i have to say, very solid tutorial. Thorough, good pace and well made. Going to have to sit down and run through your videos, I usually prefer reading tutorials/directions, but that was right on. I'm assuming the same flow applies to commands as it does to functions? I saw in an older video/thread that you need to set parameter values to themselves within a define to get it to work properly - test("random ", "text") define test(#param1, #param2) { set(#param1,#param1,"Global") set(#param2,#param2,"Global") wait(2) alert("{#param1}{#param2}") } Not sure if those Set values are still necessary in the defines or not. If they are, is it because they are local variables (instead of global) or is there some other purpose for them? Again, great video, and thanks for the clarification. For anyone new or just not getting something in particular, I highly suggest running through HelloInsomnia's content! 1 Quote Link to post Share on other sites
HelloInsomnia 1103 Posted December 20, 2017 Author Report Share Posted December 20, 2017 You rock HelloInsomnia! Thanks for clearing that up, and i have to say, very solid tutorial. Thorough, good pace and well made. Going to have to sit down and run through your videos, I usually prefer reading tutorials/directions, but that was right on. I'm assuming the same flow applies to commands as it does to functions? I saw in an older video/thread that you need to set parameter values to themselves within a define to get it to work properly - test("random ", "text") define test(#param1, #param2) { set(#param1,#param1,"Global") set(#param2,#param2,"Global") wait(2) alert("{#param1}{#param2}") } Not sure if those Set values are still necessary in the defines or not. If they are, is it because they are local variables (instead of global) or is there some other purpose for them? Again, great video, and thanks for the clarification. For anyone new or just not getting something in particular, I highly suggest running through HelloInsomnia's content! Works the same way for commands (you just don't return anything in commands) Setting the parameters to global variables like that is not necessary unless you want to make them global but that wouldn't make sense in 99.99999% of all cases. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.