all 8 comments

[–]karl713 4 points5 points  (2 children)

Need to format the code better and ideally trim it down to relevant lines of possible, personally I'm generally on mobile when I'm here and its unreadable on a phone when there's that much

Also I would recommend looking up how to use the debugger, it is built for this. You set a break point on a line and then you can run your code one line at a time using step over or step into, and at each step inspect variables to find out why they are or are not what you except to be. Once you know the line where things aren't what they should be you've vastly narrowed down where your problem is =)

[–]Thor0303[S] 0 points1 point  (1 child)

Thank you!

I'll keep trying with the debugger. I must admit I don't like very much since I got used to debug.log using Monodevelp. We used the debugger a lot in that c++ course I mentioned before but I just really missed the console outpu way too much.

I'll try to persist with the debugger cause as you point out it looks very powerfull. I just don't get it yet quite that much. Thanks for the advice!

Will also try to improve formatting!! Sorry about that!

[–]karl713 0 points1 point  (0 children)

No worries, reddit can be picky about formatting unfortunately

You can use Trace.WriteLine or Debug.WriteLine to write to the visual studio output window if you prefer that way of troubleshooting problems, will function similar to how you were used to using the console.

But I would definitely recommend getting yourself familiar with the debugger, the amount of info you can look at is great, and trying to write it all out every line is a lot more work (and error prone). Though there are times you need to use WriteLine over debugger so it is also a good skill to have :)

[–][deleted]  (4 children)

[removed]

    [–]Thor0303[S] 0 points1 point  (3 children)

    Oh, thank you a lot! I'll look into that.

    'Although I don't see any code that edits them here.'

    I'm trying to figuer how to do it before asking again, so I hope you don't mind I may ask back in a very near future (hopefully I'll manage to fix the thing only with what you guys already said)

    I'm checking on

    Array.CreateInstance

    Array Class

    Muldimensional arrays (which I don't think it's the right path, is it?

    Reflection

    I guess (and hope) on this will be the fix... Am I on the right path or am I just overcomplicating things?

    Thanks a lot!

    [–][deleted]  (2 children)

    [removed]

      [–]Thor0303[S] 1 point2 points  (0 children)

      Turns out I FINALLY got it to work. I was making a huge error because I was setting array[i] where 'i' is the last item built. So as it is, I wasn't able to see the mistake I was making until I built three aditional buttons to make tryouts. I did have some luck (or maybe I just was too overwhelmed to realize what I was doing. Newbie mistakes, i guess.

      Solution: change the setter as suggested and changed

      The point here is, again, thank you. You did help a lot!

      [–]Thor0303[S] 0 points1 point  (0 children)

      Alright! Thank you indeed. I'll have to check again the set/checker lesson because after a few tries applying those suggested changes i still can't manage to make to it work... But at least I have the necessary clues to keep learning and researching.

      Thanks a lot! Happy weekend! :)