Script Commands Bug Fixes
#2
Why I Had to Update The Script

Ever since RMXP came out, scripters had to deal with the dreadful Interpreter#command_355 aka script call method bug that made the maker get frozen if there was a single line call that ever returned a false value, not a falsey value like nil as Zeriab reminded us in another thread, but a pure false value (FalseClass object).

For about 2 decades all scripters including your servitor had been dealing with the symptoms but NEVER the actual illness this bug was causing. To better understand the issue, I'll explain it here from the very beginning.

Several bug fixes dealt with the result variable's false value that would freeze the script call event command by changing the if statement or by making it irrelevant aka non existing at all like it was the case in my now old solution. And there was Zeriab's own answer to the issue that relied on a wait command of sorts to get out of that horrible loop.

So far they seemed to work as intended, even if some people claimed that some solutions didn't consider all possible caveats for any given reason.

You see guys, THAT was the ACTUAL PROBLEM! Shocked Nobody was truly reading that piece of code properly! And when I say nobody, I truly mean it and I'm 100% certain that was the case here. Yeap, that nobody also included me, yours truly... until NOW!

This new version released on February 26th, 2025 finally dealt with the issue the way it should have been from the very beginning! Grinning

The problem was NEVER the if result == false conditional statement itself whenever you let it evaluate a single line of code.
Nope guys, that was the distraction that pesky Bug bug had prepared for us to survive another year! Angry Nasty little insect!

The actual issue was a lot simpler than that! Shocked

The command_355 method interrupted the @indes += 1 update the loop included if there was no other line of code included after the first one, that curiously has a different event command code that additional script call commands. THIS WAS THE REAL ISSUE! Incredible


Now my bug fix adds a @index += 1 fix under 1 single condition: to never find a secondary script call command right after the initial one (with a different event command code).

This means the following: RMXP no longer gets stuck there interpreting the same old script call event command forever and ever! Two Thumbs Up! 

Confused "Why not?", people like Melana might ask at this point.

It's very simple indeed! Grinning Now it can properly read the next event command, whatever that might be, because it successfully stopped testing the previous script call AS IT SHOULD HAVE BEEN the case from the very beginning. Winking It can't read a command that's already behind the current position due to the way the Interpreter was designed by the RM developers.

SPECIAL THANKS

I want to thank Zeriab Two Thumbs Up! not for giving us just an old way to "fix" the bug (that also worked fine), because ALL of OUR OLD solutions were nothing but WORKAROUNDS as I have exposed that here, but mainly because of his persistance in dealing with the Ruby interpreter, not to be confused with RGSS Interpreter at all. Happy with a sweat Well yeah, we have extensively talked about the Interpreter class here for sure.

EDIT

I had to update the latest version of my bug fixes because the command_355 fix actually introduced a new Bug bug. This means that I didn't notice that I misnamed the old_pos variable as old_post... Confused I guess I got pranked by the fact I was talking about old posts or the autocorrection feature did it again and I failed to realize it in time. Yet, Dog Wulfo already let me know about that bug and I gladly smashed it to smithereens already.
"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.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

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! Laughing + Tongue sticking out

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
Reply }


Messages In This Thread
Script Commands Bug Fixes - by kyonides - 02-13-2025, 04:06 AM
RE: Script Commands Bug Fixes - by kyonides - Yesterday, 04:15 AM
RE: Script Commands Bug Fixes - by kyonides - Yesterday, 07:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   The Steal and Peep Script DerVVulfman 12 759 02-19-2025, 07:20 AM
Last Post: Ace_V
   Text Scroll Script - Enhanced DerVVulfman 23 36,130 02-18-2021, 04:16 AM
Last Post: DerVVulfman
   Cursor Script Selwyn 7 16,258 09-28-2019, 02:13 PM
Last Post: DerVVulfman
   ACBS FIX SCRIPT #2: Advanced Cry Correction DerVVulfman 1 5,058 08-09-2019, 03:42 PM
Last Post: aeliath
   ACBS FIX SCRIPT #1: Victory Cries Patch DerVVulfman 1 5,160 08-08-2019, 02:53 PM
Last Post: aeliath
   Spritesheet Generator Conversion Script DerVVulfman 0 4,578 11-21-2018, 04:48 AM
Last Post: DerVVulfman
   Event Spawner Fixes DerVVulfman 8 17,798 01-02-2018, 05:48 AM
Last Post: DerVVulfman
   Neo Mode 7 Script by MGCaladtogel MGC 59 130,188 09-29-2017, 03:48 AM
Last Post: DerVVulfman
   Longer Script Calls LiTTleDRAgo 0 5,196 05-17-2017, 12:36 AM
Last Post: LiTTleDRAgo
   SLOLS: Snake Look-alike on Load Script Zeriab 3 11,861 05-14-2017, 06:25 PM
Last Post: LiTTleDRAgo



Users browsing this thread: 2 Guest(s)