Global variable are not allowed !!

please help, i am using canvas but my item became soft rejected because this in screenshot:

the recommended look at this:

how can i fix it?
thnx in advanced


Insert all your code into:

(function() {


If your scripts are complex and require a global variable outside the above block use this function to get the vars:

(function() {
       var global-one;
       var global-two;

       $.fn.getGlobalVar = function (name) {
        return eval(name);

And to read the values use:

$.fn.getGlobalVar("VARIABLE NAME"); //Example $.fn.getGlobalVar("global-one");

1 Like

ok i will ty it , thank you