Lani's Locks and Keys
#9
While running the demo on HiddenChest, it threw the following warnings:

095:Lani's Locks and Keyrings:508: warning: found `= literal' in conditional, should be ==
095:Lani's Locks and Keyrings:790: warning: found `= literal' in conditional, should be ==
098: Lani's Keypads Engine:976: warning: found `= literal' in conditional, should be ==

The methods involved in this buggy case are here just in case you want to take a look at them...

Code:
def test_keys(lock_id)
    # Set Effective
    effective = false
    # Get ID of lock
    @lock_id  = 0
    @lock_id  = LaniLocks::LOCKS[lock_id] if LaniLocks::LOCKS.has_key?(lock_id)
    # Return false if no keys held
    return false if $game_system.keyring.keys == []
    # Sort through all keys held
    for key in $game_system.keyring.keys
      # Acquire array of locks for a given key
      keyset    = $game_system.keyring[key]  
      # Return true if a skeleton key
      unless keyset.is_a?(Array)
        return true if keyset = -1
      end
      # Sort through all locks the key can open
      for lock_id in keyset
        # return true if a key matches
        effective = true if lock_id == @lock_id
      end
    end
    # Return effective
    return effective      
  end

Code:
def loop_locks(key)
    keyset = $game_system.keyring[key]
    # If a sksleton key
    unless keyset.is_a?(Array)
      if keyset = -1
        test_lock_success     # Assume Success
        test_lock_switches    # Turn on proper switches
        lock_defaults         # Restore defaults
        return                # And Esit Method
      end
    end
    # Cycle through all locks the key can open
    for key_id in keyset
      test_lock(key_id)
    end
    # Restore Defaults
    lock_defaults
  end

Code:
def loop_keypads(keycard)
    keyset = $game_system.keyring[keycard]
    # If a skeleton key, always true
    unless keyset.is_a?(Array)
      return true if keyset = -1
    end
    # Cycle through all locks the keycard can open
    for key_id in keyset
      return true if (@key == key_id) == true
    end
    return false
  end

=_= You've stolen my drama's plot! Well, the main issue here is that there's no proof that your demo's story is based on facts!
P.S.
But at the end I can't stand THAT character so I don't know whether or not I should even complain here...
"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
Lani's Locks and Keys - by DerVVulfman - 05-14-2019, 04:58 AM
RE: Lani's Locks and Keys - by yamina-chan - 05-14-2019, 02:04 PM
RE: Lani's Locks and Keys - by DerVVulfman - 05-15-2019, 04:08 AM
RE: Lani's Locks and Keys - by yamina-chan - 05-15-2019, 02:41 PM
RE: Lani's Locks and Keys - by DerVVulfman - 05-15-2019, 09:12 PM
RE: Lani's Locks and Keys - by yamina-chan - 05-16-2019, 01:00 AM
RE: Lani's Locks and Keys - by DerVVulfman - 05-16-2019, 03:09 AM
RE: Lani's Locks and Keys - by yamina-chan - 05-16-2019, 11:12 PM
RE: Lani's Locks and Keys - by kyonides - 11-07-2019, 06:29 AM
RE: Lani's Locks and Keys - by DerVVulfman - 11-08-2019, 05:39 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Quick Keys blazingamer 0 4,724 03-07-2008, 06:56 AM
Last Post: blazingamer



Users browsing this thread: 1 Guest(s)