Blizz abs local switches not working

Started by Soulshaker3, May 20, 2014, 03:40:20 pm

Previous topic - Next topic

Soulshaker3

May 20, 2014, 03:40:20 pm Last Edit: May 20, 2014, 06:58:51 pm by soulshaker3
So here's the deal i recently got blizz abs plus some other add ons for it and recently too i've been starting to do the actual story for my game and whenever i turn a self switch on the game crashes.
Here's the detailed error:

And my blizz abs plugin
https://www.mediafire.com/?50osi05jwz09938
EDIT: Okay i've been doing more testing and when i use the tp comand in the event options it gives the same error.
EDIT 2 : With more testing i've discovered it only behaves like that if it's a new game created because if i execute the save file it works no problems.
Hellow?

Zexion

There is already a fix on the blizz abs thread. Here, I'll quote it for ya.
Quote from: winkio on March 03, 2014, 12:41:00 pm
try changing line 8097 int Blizz-ABS part 2 from

if $game_map.events[event_id].trigger > 4


to

if event_id != 0 && $game_map.events[event_id].trigger > 4


Soulshaker3

Hellow?

Zexion

Pretty sure that has nothing to do with the abs now, buy_rate= is from another script

Soulshaker3

I tested and it only gives that error when my hud is visible i will post the script here to see if you can manage to understand what is happening.
The hud is only visible when $game_switches[1] = true

Spoiler: ShowHide
#==============================================================================
# Hud - Sword Art Online - RMXP
#------------------------------------------------------------------------------
# Criador:  lasso (RMVXA)
# Convertido por TânatosMaker para RMXP
#==============================================================================

class Spriteset_Map
  alias initialize_HUD initialize
  def initialize
    create_hud
    initialize_HUD
  end
  def create_hud
    @GAMESWITCHID = 1
    @HUD = Sprite.new(nil)
    @HUD.z = 150
    @HUD.bitmap =Bitmap.new("Graphics/Pictures/HUD/HUD.png")
    @HPBAR = Sprite.new(nil)
    @HPBAR.z = 149
    @HPBAR.bitmap = Bitmap.new("Graphics/Pictures/HUD/HPBARH.png")
    @old_name = ""
    @old_hp = 0
    @old_max_hp = 0
    @old_level = 0
    @old_switchState = 0
  end
  alias dispose_HUD dispose
  def dispose
    dispose_hud
    dispose_HUD
  end
  def dispose_hud
    @HUD.dispose
    @HPBAR.dispose
  end
  alias update_HUD update
  def update
    refresh_hud if @old_switchState != $game_switches[@GAMESWITCHID] or @old_name != $game_party.actors[0].name or @old_hp != $game_party.actors[0].hp or @old_max_hp != $game_party.actors[0].maxhp or @old_level != $game_party.actors[0].level
    update_HUD
    hide_HUD
  end
  def hide_HUD
    if !$game_switches[@GAMESWITCHID]
      @HUD.bitmap.clear
      @HPBAR.bitmap.clear
    end
  end
  def refresh_hud
    @HUD.bitmap.clear
    @HUD.bitmap = Bitmap.new("Graphics/Pictures/HUD/HUD.png")
    @HUD.bitmap.draw_text(45, 22, 80, 30, $game_party.actors[0].name)
    @HUD.bitmap.font.size = 16
    @HUD.bitmap.draw_text(241, 45, 70, 20, $game_party.actors[0].hp.to_s + "/" +$game_party.actors[0].maxhp.to_s, 1)
    @HUD.bitmap.draw_text(311, 45, 30, 20, "Lv " + $game_party.actors[0].level.to_s, 1)
    if (($game_party.actors[0].hp*100)/$game_party.actors[0].maxhp)<20
      @HPBAR.bitmap = Bitmap.new("Graphics/Pictures/HUD/HPBARL.png")
    elsif (($game_party.actors[0].hp*100)/$game_party.actors[0].maxhp)<60
      @HPBAR.bitmap = Bitmap.new("Graphics/Pictures/HUD/HPBARM.png")
    else
      @HPBAR.bitmap = Bitmap.new("Graphics/Pictures/HUD/HPBARH.png")
    end
      for x in 126..335
      for y in 27..43
        if y>-3*x/2+313*$game_party.actors[0].hp/$game_party.actors[0].maxhp+218
          @HPBAR.bitmap.set_pixel(x,y,Color.new(0,0,0,0))
        end
      end
    end
    @old_level = $game_party.actors[0].level
    @old_hp = $game_party.actors[0].hp
    @old_max_hp = $game_party.actors[0].maxhp
    @old_name = $game_party.actors[0].name
    @old_switchState = $game_switches[@GAMESWITCHID]
  end
end
Hellow?

G_G

That script literally has nothing to do with the error you're showing us.

Soulshaker3

I know it doesn't have literaly nothing to do but it only happens when that is being displayed what could that be?
Hellow?

Zexion

When you run the game from the editor, and the bug happens which script is it showing you? Post that one.

Soulshaker3

It opens the last one I was in... it's really strange...
Hellow?

G_G

Upload your project and someone can take a peak at it.

Could also try CTRL + SHIFT + F and type in "buy_rate" and see what comes up.

Soulshaker3

May 21, 2014, 01:46:00 pm #10 Last Edit: May 21, 2014, 01:51:55 pm by soulshaker3
Quote from: gameus on May 21, 2014, 12:41:43 pm
Upload your project and someone can take a peak at it.

Could also try CTRL + SHIFT + F and type in "buy_rate" and see what comes up.

i tryed doing that in many scripts tought i never managed to find it i'll upload the project and send to someone who's interested in helping
EDIT: ok i didn't noticed the "Shift" part there so i did that and it doesn't find anything on the project.
Hellow?

ForeverZer0

It would have to be there somewhere.
The game is not making up the name of the variable.
Check the events for script calls if its not in the editor.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Soulshaker3

May 21, 2014, 06:17:53 pm #12 Last Edit: May 21, 2014, 06:20:11 pm by soulshaker3
Holy crap i don't believe in my mistakes... here's the deal i had data corrupted from my game so i had to use data from another project and there in the global events or what is it called it had an event to adjust the rates of a shop script i had... i don't believe im so dumb
Hellow?