parseInt return value is undefined

Advanced Renamer forum
#1 : 06/10-16 19:57
Posts: 1
i'm getting error when running this code:

return item.newBasename.substring(0, 8)+(parseInt(item.newBasename.substring(11, 10))+3).toString();

does anyone have an idea why is returning error?


06/10-16 19:57
#2 : 06/10-16 23:23
G. Lambany
G. Lambany
Posts: 187
Reply to #1:
Probably because your substring indexs are outside the filename boundary or something like that, and return an empty string, or the part of the substring isn't numbers, which you are then trying to convert to a number. The parsetInt seems kind of picky.

06/10-16 23:23