01-01-2019, 12:32 PM
I have been dealing with a stupid bug I didn't manage to deal with for over a day, it seemed to be mystical by nature, something belonging to the realm of fantasy or a virus or anything corrupted by nature. Anybody would say it was caused by reaching my limits, that I was a small fish in the big ocean of programming and compilation. I had looked for an answer online as many would do it, and the only topic that handled my issue only had a single post, meaning it had been never been answered by knowledgeable rubyists or programmers. Then I found that a function definition was available at a specific file. Since I had downloaded the Ruby source code, that was no problem for me to open it and search for information. First I checked out the function declaration, but it was cryptic at best, then I read the definition, and I just discovered the method I had been using could be squeezed in a single function call...
Nope, that didn't mean I had an actual answer to my strange issue. Then I realized Ruby's nature had a lot to do with it, it IS weakly typed so I would never get an excellent explanation on certain functions even while looking at code. Later on I suspected I didn't read carefully or overlook some vital information. A few moments later, not really long after, not even five minutes after my suspicion had arouse, I finally got the whole picture! I overlooked the true nature of what I was defining a single value with a specific but not so temporary value. Guess what? I was making it extremely local instead of using it in a wider scope by calling the actual VALUE I needed to address from the very beginning...
What is the short explanation on what had happened to me then? I just tried to use a variable in the same way I used another one that is not supposed to have the same scope in the Ruby side. By retrieving and setting its value the very same way I could do it with the second one, plus a slight change in the function name, it would NEVER work. I had to be clever and understand the actual meaning of the first argument I was passing. Once I did so, the test game, the compiler, everything stopped complaining about errors... =_=
I cannot really say I am falling asleep even if it's 5:30 a.m. here, it seems that I just preferred to be lazy and stop looking for the actual implementation of the feature I was coding in the last few days...
Nope, that didn't mean I had an actual answer to my strange issue. Then I realized Ruby's nature had a lot to do with it, it IS weakly typed so I would never get an excellent explanation on certain functions even while looking at code. Later on I suspected I didn't read carefully or overlook some vital information. A few moments later, not really long after, not even five minutes after my suspicion had arouse, I finally got the whole picture! I overlooked the true nature of what I was defining a single value with a specific but not so temporary value. Guess what? I was making it extremely local instead of using it in a wider scope by calling the actual VALUE I needed to address from the very beginning...
What is the short explanation on what had happened to me then? I just tried to use a variable in the same way I used another one that is not supposed to have the same scope in the Ruby side. By retrieving and setting its value the very same way I could do it with the second one, plus a slight change in the function name, it would NEVER work. I had to be clever and understand the actual meaning of the first argument I was passing. Once I did so, the test game, the compiler, everything stopped complaining about errors... =_=
I cannot really say I am falling asleep even if it's 5:30 a.m. here, it seems that I just preferred to be lazy and stop looking for the actual implementation of the feature I was coding in the last few days...
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE