Simply surround the string types with
parseInt(num)
to cast it to an integer number. You could also use
parseFloat
. You need to parse all the string types that should actually be a number.
Try this:
loadNotes(parseInt(resultado[i]),parseInt(resultado[parseInt(i)+parseInt(num)])),pos_x,pos_y);
Good luck!