Thoughts on the Interpreter's Script Command
#6
Thinking It sounds curious that Dog Wulfo wanted you to learn about that thread of mine or remind you of your 15-year-old thread.

Zeriab Wrote:Note: false is a falsey value. false is equal to falsenil is a falsey value. nil is not equal to false.

Indifferent Yeah, I know that. I hope other people do as well.

Yet, I'd call nil something more complex than a non existing object (actually an uninitialized object) or a falsey value. It also means it's not truly undefined. You see, internally nil or better known there as RUBY_Qnil is a runtime replacement for undefined value, usually only true if there's a zombie CRuby object still floating around, IIRC. Yet, it seems that there are times where a bug could rise because the object is undefined already, and there are some internal checks to prevent that from taking place in most cases.

And for people interested in the C part of the Ruby engine, you gotta know that RUBY_Qtrue and RUBY_Qfalse not only exist but are NOT equal to C and C++ true and false values. Not even to 1 and 0, respectively! Shocked

That's why Ruby Ruby tests that take 0 as a truthy value might easily enrage the C and C++ fans. Laughing

In regard to returning the same value, it could be used as a replacement for an actual test for a given child class that doesn't care about testing a value as long as it has been set to anything other than a falsey value. But yeah, defining a true as return value for a question? method is the preferred way to solve it in RMVX ACE, for instance.

OK, I opened the maker to check what happened to the single line and multi-line script calls, and yes, I gotta admit that false won't be an issue in multi-line scripts.

The thing is that I was fed up with the maker getting frozen because of stuff like:

@test_var = nil

And then testing it later on like in the example below:

@test_var == true

...as a single line script call. Confused

And thanks for motivating me to keep testing the Interpreter#command_355 method because I ended up finding yet another way to fix it without even dealing with the result == false issue! Grinning I'll post it in my bugfix thread in no time!

The New Fix, It's SO Incredibly \"Stupid\" That I Can't Believe Nobody Thought About It Till Now!
"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
RE: Script Commands Bug Fixes - by kyonides - 02-13-2025, 08:35 PM
RE: Script Commands Bug Fixes - by Zeriab - 02-26-2025, 07:53 AM
RE: Script Commands Bug Fixes - by kyonides - 02-26-2025, 05:45 PM
RE: Script Commands Bug Fixes - by Zeriab - 02-26-2025, 07:25 PM
RE: Thoughts on the Interpreter's Script Command - by kyonides - Yesterday, 03:42 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Your thoughts on Action Game Maker? PK8 10 20,281 11-18-2011, 03:58 AM
Last Post: KasperKalamity
   Pause Script Feature Requests? PK8 11 18,634 05-25-2009, 11:07 AM
Last Post: Kain Nobel
   Beyond the script editor line: Is it bad practice? PK8 6 12,481 05-22-2009, 09:27 PM
Last Post: Charlie Fleed



Users browsing this thread: 4 Guest(s)