Script Commands Bug Fixes
#3
(02-13-2025, 03:19 PM)Zeriab Wrote: The conditional branch script command requires the result to specifically be either true or false. Try putting in a number like 12 and you'll see the conditional branch being skipped as well.
Expanding it to work with truthy and falsey values is a good idea ^^

Well, I run a test to see what happens if you simply pass a number to a custom method like the following:

Code:
class Interpreter
  def is_true?(var)
    var
  end
end

It doesn't alter the value by default but just returns the argument immediately as you can see above.

Result: true
As people might already know, numbers and many other objects are treated as true by default.

My fix takes anything you might have put as a script condition and negates it twice. Thus, if it was a number, any non NilClass object or a TrueClass one, it will always be true. This means it does respect the need to evaluate to true or false. All nil's would become false and stop being ignored by the conditional branch. Great, don't you think? Grinning

Regarding the command_355 stuff, I do understand your desire to add the waiting time but I don't share it. My variant is inspired by VX ACE where any result of the script event command evaluation does NOT become an integral part of the interpretation mechanism. Meaning that it won't stop executing it just because it returned a falsey value like it does in XP.

Anyway, I'd need to get access to a few edge cases where I can clearly see the need to use another version or fix it some other way before I would dare to modify it or replace it.
"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 Zeriab - 02-13-2025, 03:19 PM
RE: Script Commands Bug Fixes - by kyonides - 02-13-2025, 08:35 PM

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



Users browsing this thread: 1 Guest(s)