How do you reset switches?

I already figured out how to reset self-switches and variables, but I get an error for resetting normal switches. Here's my code:

$game_switches[1..100] = false
$game_variables = 0
$game_self_switches =
Game_SelfSwitches.new

I attached the error message to this post, and this is where it points at in the script:

  #--------------------------------------------------------------------------
  # * 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

I tried $game_switches[1...100], $game_switches[1..5000], and $game_switches[1...5000]. Nothing works.

Untitled.png
I'm curious... Is there a reason you're not using the Control Switches > Batch eventing command?
I'm curious... Is there a reason you're not using the Change Switch > Batch eventing command?
I don't know what that is 😛 . Will that help?
Switches-XP_zps804b14e6.png


🙂
Oh wow! I didn't know that. Thanks 🙂
You're welcome! 🙂

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-you-reset-switches.32089/