C
C#2y ago
luness

❔ System.IndexOutOfRangeException has been thrown"Index was outside the bounds of the array."

Hi I get this message at the line " Tile temp = Tiles[x, y]; " in my SwapTiles method when im trying to move around the tiles. Here's my code: https://pastebin.com/BbVvEC3V I appreciate any help
Pastebin
using System;using System.Collections.Generic;using System.Drawing;...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
5 Replies
phaseshift
phaseshift2y ago
it means your index is wrong... the array is not as big as the index youre trying to use
luness
lunessOP2y ago
how do I fix it :/
phaseshift
phaseshift2y ago
make your index smaller, or make your array bigger
luness
lunessOP2y ago
Oh Okay I'll try , thank you
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server