So in my code i have something along the lines of this:
var tilemap:Vector.<String>;
tilemap = Vector.<String>(dataString.split("\n"));
When i trace this i get the correct results, and i have verified that there is no extra whitespace that could be screwing stuff up. However, later in my code, i try doing something like this:
for (var y:int = 0; y < tilemap.length; y++)
for (var x:int = 0; x < tilemap[y].length; x++)
trace(tilemap[y].charAt[x]);
But i get the following error:
[Fault] exception, information=ReferenceError: Error #1069: Property 0 not found on builtin.as$0.MethodClosure and there is no default value.
What exactly is going wrong here?
Never mind, it was a stupid mistake.
This line:
trace(tilemap[y].charAt[x]);
Should have been:
trace(tilemap[y].charAt(x));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.