You need to make it a user defined function (UDF). That won't work because a UDF needs to be a .au3
file. I'm not familiar with ISN studio, however to include a UDF you need to do this.
#include "C:\path\myfunctions.au3"
Also if the UDF is in the same location as the script you can just use the relative path like this.
#include "myfunctions.au3"
Here is are some example UDF's.