10-02-2018, 01:24 PM
The problem with said safeguards is that it doesn't teach the game developer or the scripter what kind of errors they are currently making. What would they get from displaying an invalid month? Nothing plus they wouldn't know where the error is being hidden by the safeguard.
If we were talking about stuff like a disposed bitmap in RGSS that will be soon recreated, safeguards wouldn't be a bad idea for it would skip something that's become unnecessary in that specific case. Passing wrong arguments is a serious mistake and should be treated "harshly" by calling raise. When you add safeguards in let's say C-like code is because you know there will be times where you don't expect the code to find a value worth processing. It's be like and else statement for cases when an actor did not pick a special skill listed in a series of if or case when statements. Then a safeguard would be justified for they should exist too many other skills that don't trigger any special handling like extra animations or attacks.
One of the problems of developing RGSS scripts is that we aren't used to making test units to "programmatically" define if our scripts work as expected without abusing of the overheaded payload of our code while executing. We could say we're still coding empirically sadly.
If we were talking about stuff like a disposed bitmap in RGSS that will be soon recreated, safeguards wouldn't be a bad idea for it would skip something that's become unnecessary in that specific case. Passing wrong arguments is a serious mistake and should be treated "harshly" by calling raise. When you add safeguards in let's say C-like code is because you know there will be times where you don't expect the code to find a value worth processing. It's be like and else statement for cases when an actor did not pick a special skill listed in a series of if or case when statements. Then a safeguard would be justified for they should exist too many other skills that don't trigger any special handling like extra animations or attacks.
One of the problems of developing RGSS scripts is that we aren't used to making test units to "programmatically" define if our scripts work as expected without abusing of the overheaded payload of our code while executing. We could say we're still coding empirically sadly.
"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