Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: Soulshaker3 on May 20, 2014, 03:40:20 pm

Title: Blizz abs local switches not working
Post by: Soulshaker3 on May 20, 2014, 03:40:20 pm
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:
(http://i.imgur.com/YBMTWfB.png)
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.
Title: Re: Blizz abs local switches not working
Post by: Zexion on May 20, 2014, 11:25:11 pm
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

Title: Re: Blizz abs local switches not working
Post by: Soulshaker3 on May 21, 2014, 03:48:23 am
Now it gives this error:
(http://i.imgur.com/hTNDVFg.png)
Title: Re: Blizz abs local switches not working
Post by: Zexion on May 21, 2014, 04:00:38 am
Pretty sure that has nothing to do with the abs now, buy_rate= is from another script
Title: Re: Blizz abs local switches not working
Post by: Soulshaker3 on May 21, 2014, 06:21:19 am
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
Title: Re: Blizz abs local switches not working
Post by: G_G on May 21, 2014, 07:53:55 am
That script literally has nothing to do with the error you're showing us.
Title: Re: Blizz abs local switches not working
Post by: Soulshaker3 on May 21, 2014, 11:22:18 am
I know it doesn't have literaly nothing to do but it only happens when that is being displayed what could that be?
Title: Re: Blizz abs local switches not working
Post by: Zexion on May 21, 2014, 11:26:04 am
When you run the game from the editor, and the bug happens which script is it showing you? Post that one.
Title: Re: Blizz abs local switches not working
Post by: Soulshaker3 on May 21, 2014, 11:30:15 am
It opens the last one I was in... it's really strange...
Title: Re: Blizz abs local switches not working
Post by: G_G 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.
Title: Re: Blizz abs local switches not working
Post by: Soulshaker3 on May 21, 2014, 01:46:00 pm
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.
Title: Re: Blizz abs local switches not working
Post by: ForeverZer0 on May 21, 2014, 05:00:26 pm
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.
Title: Re: Blizz abs local switches not working
Post by: Soulshaker3 on May 21, 2014, 06:17:53 pm
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