# Undenifed array problem

**URL:** <https://forum.kirupa.com/t/undenifed-array-problem/220711>\
**Category:** Uncategorized\
**Created:** [March 28, 2007, 4:04pm UTC](https://forum.kirupa.com/t/undenifed-array-problem/220711 "2007-03-28T16:04:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Macsy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/macsy/32/3238_2.png) [@Macsy](https://forum.kirupa.com/u/Macsy)\
**Post date:** [March 28, 2007, 4:04pm UTC](https://forum.kirupa.com/t/undenifed-array-problem/220711/1 "2007-03-28T16:04:47Z")

</div>

My script below is suppose to make a long text into little portions, im far from done but please… Why do i get an error here?  
The array textMessage is undenifed… why?

[AS]

var textMessage:Array  
var textRows:Number = 0;  
var textStart:Number = 0;  
autoWrite = function (textOut)  
{  
numberOfDots = 0;  
for (i = 0; i \< textOut.length; i++)  
{  
if (textOut.charCodeAt (i) == “46”)  
{  
numberOfDots++;  
if (numberOfDots == 2)  
{  
textMessage[textRows] = i; //\<\<\<\<\<\<\<\<\<\<\<\<\< PROBLEM?  
textRows++;  
textStart = i;  
numberOfDots = 0;  
trace (textMessage);  
}  
}  
}  
};  
autoWrite (“hasdhgahgsdgha.jsghdaghjsdghjhg.ghjagshjdghjasdgjh.adaksdasd.gsfsdfw.asdagherhe.”);  
[/AS]
