RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
TypeError at Line 20 of Game_Switches [VX]

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 71
RMRK Junior
exactly like the topic says it. I have another copy of my game before this and it works fine. The said line is not messed with.

I don't know what to do as I'm not a scripter. :\

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Best IRC Quote2014 Zero to Hero2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
Code: [Select]
#==============================================================================
# ** Game_Switches
#------------------------------------------------------------------------------
#  This class handles switches. It's a wrapper for the built-in class "Array."
# The instance of this class is referenced by $game_switches.
#==============================================================================

class Game_Switches
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    @data = []
  end
  #--------------------------------------------------------------------------
  # * Get Switch
  #     switch_id : switch ID
  #--------------------------------------------------------------------------
  def [](switch_id)
    if @data[switch_id] == nil
      return false
    else
      return @data[switch_id]
    end
  end
  #--------------------------------------------------------------------------
  # * Set Switch
  #     switch_id : switch ID
  #     value     : ON (true) / OFF (false)
  #--------------------------------------------------------------------------
  def []=(switch_id, value)
    if switch_id <= 5000
      @data[switch_id] = value
    end
  end
end
This is exactly what the script is ingame. Make sure that it is this, with absolutely nothing changed.
If it isn't that, you're doing it wrong.
it's like a metaphor or something i don't know

**
Rep:
Level 71
RMRK Junior
Yeah, it was exactly like that. I found out what was the problem. It was bulletxt's Autosave.

So I decided that my game will be without autosave.

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Best IRC Quote2014 Zero to Hero2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
It doesn't need to be. What scripts are you using? The scripts could be made compatible. I need to test my scripting anyway.
If you want to keep autosave, post the script and say what other scripts you use, if any. If you don't care, don't.
it's like a metaphor or something i don't know