I tryed to write a function via a external source file for the image loading part of my program. However, even when I include the image variables apon calling the function ( editorloadimg(x,y,z...) ) I get a paramater missmatch error "load image expects integer". If I replace the variables with numbers, the function works, and the images load fine. I even tryed declaring the variables inside the function right before loading the images, still gave me the error.
It has to be possible to use variables inside functions. What am I doing wrong?