# String to Int

**URL:** <https://forum.kirupa.com/t/string-to-int/82193>\
**Category:** Uncategorized\
**Created:** [March 8, 2005, 12:58pm UTC](https://forum.kirupa.com/t/string-to-int/82193 "2005-03-08T12:58:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![A7RSTR7K3](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@A7RSTR7K3](https://forum.kirupa.com/u/A7RSTR7K3)\
**Post date:** [March 8, 2005, 12:58pm UTC](https://forum.kirupa.com/t/string-to-int/82193/1 "2005-03-08T12:58:26Z")

</div>

Hey everyone… I was wondering, how to convert a string to an int… here’s the thing when I use Number(myVar) it returns NaN. The string that I am trying to parse has a leading number followed by  
because I’m using loadVars and in order to make it more readable I’m trying to make a new variable on everyline… So anyone know how I can do this I just need to remove the  
.
