I've figured this out already, the number can be converted to string using CHRVAL(), so the code below works:
str1 = strcat(chrval(var1),'_')
str2 = strcat(str1,chrval(var2))
/IMAGE,SAVE,str2,bmp
/IMAGE does not need the % operator to read the value of the string, it will use the string value...