
I recently decided to get in depth with functions in my code mainly because I was reusing lines of code I didn't need to. However, I am not sure if I am doing this right.... Here in my gist, I have function declaration starting at line 50. From what I understand, since this function is outside the main body of the on(chat) function I declare into a variable for the main script function to call back. What I am wondering, is my function starting at line 62 correct? I am only calling this function inside getDamResolution so I didn't put it into a variable. <a href="https://gist.github.com/mpiersant/fc3979961e5e93fdeb6c" rel="nofollow">https://gist.github.com/mpiersant/fc3979961e5e93fdeb6c</a>