# \[MX\] CharAt Probs.. Fast Help Please!

**URL:** https://forum.kirupa.com/t/mx-charat-probs-fast-help-please/25398
**Category:** Uncategorized
**Created:** [July 12, 2003, 8:44am UTC](https://forum.kirupa.com/t/mx-charat-probs-fast-help-please/25398 "2003-07-12T08:44:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![phorte](https://avatars.discourse-cdn.com/v4/letter/p/77aa72/32.png) [@phorte](https://forum.kirupa.com/u/phorte)
#### Post date: [July 12, 2003, 8:44am UTC](https://forum.kirupa.com/t/mx-charat-probs-fast-help-please/25398/1 "2003-07-12T08:44:21Z")

</div>

Well I have an example here for you and I want to know why it doesnt work?? And how can i make it work??[AS]  
//Initial Number  
myNumber = 512  
//Add 10 to the number  
myNumber += 10

//Trace the Number  
trace(myNumber)  
//Trace the character at 1 in the number  
trace(myNumber.charAt(1))  
[/AS]  
The Output looks like this:

> 522  
> undefined

Thanks in advance…

-Scotty…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 12, 2003, 8:58am UTC](https://forum.kirupa.com/t/mx-charat-probs-fast-help-please/25398/2 "2003-07-12T08:58:17Z")

</div>

try

```auto
myString = myNumber.toString();
trace(myString.charAt(1))

```

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 12, 2003, 11:43am UTC](https://forum.kirupa.com/t/mx-charat-probs-fast-help-please/25398/3 "2003-07-12T11:43:11Z")

</div>

yep  
you should convert number into string in the 1st place cuz charAT is for strings only :thumb:
