❔ help with error

so basicaly i have this really complex assignment for no reason and i made this code and im in the part where i have to place it back into the orignal array but im getting an error of outofbounds and i see that the variable count becomes 15 but idk how because it should be 5 in this case because the array initalized made 5 rand numbers
7 Replies
Buddy
Buddy2y ago
$debug
MODiX
MODiX2y ago
Tutorial: Debug C# code - Visual Studio (Windows)
Learn features of the Visual Studio debugger and how to start the debugger, step through code, and inspect data in a C# application.
Angius
Angius2y ago
Well, the count variable is incremented inside of the nested loop, so it will always be equal to row*col As a side note, you can reuse a single instance of random, no need to create so many
multisportz.hq
multisportz.hqOP2y ago
ok well i kinda fixed that up
multisportz.hq
multisportz.hqOP2y ago
multisportz.hq
multisportz.hqOP2y ago
still having the porblem tho with teh loop when it goes from 1 to 6 it gives that error i think its because for some reason its taking the first index of the next iteration and putting it with the previous one so thats increasing teh count too much but idk how tof ix that
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise 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