So I have two javascript files, mapper.js has a function named goMap(map_num), the structure of goMap() is
function goMap(map_num){
var som_var;
switch(map_num){
case 0: /*do stuff to "some_var"*/ return some_var; break;
case 1: /*do stuff to "some_var"*/ return some_var; break;
case 2: /*do stuff to "some_var"*/ return some_var; break;
case 3: /*do stuff to "some_var"*/ return some_var; break;
}
}
In my other javascript file I call goMap() with
var params;
$.getScript(mapper_script, function(){
params = goMap(map_num);
/*Do Stuff that relies on params*/
});
but, when I check the variable params, nothing is in there. I did make sure that the function was being executed, so that is not an issue. Anyone got any idea why this is happening?
Edit: This Works, the problem was an issue with multidimensional arrays.