New Method: GetLabelDigits
![](https://i0.wp.com/gamedev.sinwyrm.com/wp-content/uploads/2020/06/panic_button_press.gif?resize=216%2C160&ssl=1)
#PanicRoom Day 068
#100DaysOfGameDev R2D33
#100DaysOfCode R2D34
Spurred on by yesterday’s rush of creativity in the midst of performing some much-needed code cleanup, I pushed forward getting some long-awaited tasks completed that I didn’t have the heart (or balls) to tackle previously.
I had already used the same block of code twice to determine what numbers my grid label tiles were going to represent and, with another grid overlay system in play, I was planning to use it yet again two more times. This could only mean one thing: time to give it it’s own Method.
![](https://i0.wp.com/gamedev.sinwyrm.com/wp-content/uploads/2020/08/2020-08-05_devenv_call-GetLabelDigits.png?resize=578%2C89&ssl=1)
Normally, with my skill-level of coding, this is pretty straightforward, but since I am still very much a Code Newbie I encountered the need to do something I hadn’t directly worked with before: return new data back that wasn’t explicitly delivered to the Method. I struggled for a few minutes before discovering my solution and, while simple, it was a bit of a brain-bender to get down. This is probably why I shied away from it so readily on a previous attempt some time ago. But not today! Today was all about overcoming these roadblocks and speedbumps that had been plaguing me and I was determined. It just came down to proper use of the out parameter and proper variable setup going in. Once I had it properly sorted, my Method did exactly what it was supposed to and I was able to reference it multiple times and get what I wanted out of it. This is how I learn, this is how I’ll get better.
![](https://i0.wp.com/gamedev.sinwyrm.com/wp-content/uploads/2020/08/2020-08-05_devenv_function-GetLabelDigits.png?resize=631%2C182&ssl=1)
The rest of my time today was spent making changes to my Floor Grid Labels so it could be distinguished from the House Grid Labels I need to add in and get working independently of everything else. I realized I will need to have two autonomous labeling systems because their needs are going to be different and House Grid has smaller, and more numerous grid squares to work with.
![](https://i0.wp.com/gamedev.sinwyrm.com/wp-content/uploads/2020/08/2020-08-05_notepad_work-completed.png?resize=710%2C256&ssl=1)