Hi,
I'm getting a
TypeError: Error #1009: Cannot access a property or method of a null object reference.
when using tile.getTopSkin();
now, I know that in some occasions I am trying to get skins of a tile that does not contain any, but I don't get why I should get an error instead of just an "answer" such as a null result, to indicate that a skin was not found on the tile?
Why would I get an error instead of a simple "null" answer which I can check for with a simple "if" statement?
since I know I will get asked why I am trying to get the skin of a tile that doesn't have any, the answer is simple, I want to go over ALL the tiles and IF they have a skin, I want to make that skin do something (go to a frame or whatever).
The only other way, would be to actually parse the map together with the .lib file and figure out which tile contains what and so on and I do not want to have to do that.
null object reference problem
Return to “OpenSpace v2 discussions and help”
Who is online
Users browsing this forum: No registered users and 52 guests