I have a class Map, that has an array of classes Platform inside. My problem is when trying to access the information in the platform class I get this error:
BCE0019: 'ID' is not a member of 'Object'.
Here is the code:
class Platform {
var ID : int;
function Platform( thisID : int ){
ID = thisID;
}
}
class Map {
var platforms = new ArrayList();
}
var thisMap = new Map();
thisMap.platforms.Add(new Platform(1));
//Now if I try to access this information I recieve the error:
Debug.Log(thisMap.platforms[0].ID);
I’m not sure why I’m getting this error and couldn’t find anything on the internet so any help would be great!