# Typecast from string to int?

**URL:** <https://forum.kirupa.com/t/typecast-from-string-to-int/127519>\
**Category:** Uncategorized\
**Created:** [November 3, 2004, 6:38pm UTC](https://forum.kirupa.com/t/typecast-from-string-to-int/127519 "2004-11-03T18:38:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vasanthd](https://avatars.discourse-cdn.com/v4/letter/v/90ced4/32.png) [@vasanthd](https://forum.kirupa.com/u/vasanthd)\
**Post date:** [November 3, 2004, 6:38pm UTC](https://forum.kirupa.com/t/typecast-from-string-to-int/127519/1 "2004-11-03T18:38:59Z")

</div>

Hey all,  
I am developing a small game and I read external text files for points per question. I use the kirupa’s method in reading from file the simple way -

score\_onepic1\_1pc1=3&score\_onepic2\_1pc1=-7&score\_onepic3\_1pc1=-3&score\_onepic4\_1pc1=-5

While running the program and at this statement -  
\_root.txtScore=\_root.txtScore+this.score\_onepic2\_1pc1;  
, the score gets concatanated rather than summimg them up. Is there any way to specify explictly that the expression is an math rather than string operation??  
Thanks.  
–Vasanth
