- Home /
Question by
CazicThule · Jul 17, 2012 at 02:42 PM ·
arrayiphonearraysfor-looparray-out-of-range-except
IndexOutOfRange error on iPhone, but not on PC/Player
I have the following loop which accesses a multidimensional array. It works fine on PC and in the Player, but when I try to run the app for iOs it gives me an indexoutofrange exception. I'm at a loss debugging it as it ostensibly works fine everywhere else. Anyone have an idea as to what might be happening?
for (int z = worldDepthInBlocks - 1; z >= 0; z--)
{
chunk.Blocks[blockXInChunk, blockYInChunk, z].Type = blockType;
}
//In Chunk...
private Block[,,] m_Blocks;
public Block[,,] Blocks
{
get { return m_Blocks; }
set { m_Blocks = value; }
}
Comment
Your answer
Follow this Question
Related Questions
Null reference when editing an array in a for loop 1 Answer
GUI button image next 2 Answers
Resizable Array of Classes? 2 Answers
How to create an array of Transforms 1 Answer
IndexOutOfRangeException help on debug 3 Answers