[RESOLVED] Game_Character 1 Error

Started by CrimsonWolf, September 09, 2008, 09:55:27 pm

Previous topic - Next topic

CrimsonWolf

September 09, 2008, 09:55:27 pm Last Edit: September 09, 2008, 11:36:04 pm by CrimsonWolf
I just finished editing another map and as I went to do a play test, I got past the title screen and then this error popped up before I could do anything:

Script 'Game_Character 1' line 274: NoMethodError Occured

undefined method '*' for nil:NilClass


I haven't edited that script, or any other script for that matter, and I didn't do anything unusual to the map. I was just placing tiles on layers. I am using some custom tiles though. Don't know if that makes a difference. But does anyone know what could be causing it? Here's the line 274:

      return z + $game_map.priorities[@tile_id] * 32


And here's lines 259 to 280:

  #--------------------------------------------------------------------------
  # * Get Screen Z-Coordinates
  #     height : character height
  #--------------------------------------------------------------------------
  def screen_z(height = 0)
    # If display flag on closest surface is ON
    if @always_on_top
      # 999, unconditional
      return 999
    end
    # Get screen coordinates from real coordinates and map display position
    z = (@real_y - $game_map.display_y + 3) / 4 + 32
    # If tile
    if @tile_id > 0
      # Add tile priority * 32
      return z + $game_map.priorities[@tile_id] * 32
    # If character
    else
      # If height exceeds 32, then add 31
      return z + ((height > 32) ? 31 : 0)
    end
  end


Please help is you can!

Aqua

Hm...

I /believe/ that you might have messed up somewhere with the priorities of the tileset you're currently using...  but I'm not sure =/

Try adding that tileset/map to a new game and see if the error still appears.

CrimsonWolf

September 09, 2008, 10:20:00 pm #2 Last Edit: September 09, 2008, 11:39:02 pm by Starrodkirby86
Quote from: Aqua on September 09, 2008, 10:02:51 pm
Hm...

I /believe/ that you might have messed up somewhere with the priorities of the tileset you're currently using...  but I'm not sure =/

Try adding that tileset/map to a new game and see if the error still appears.


Nope. I tried adding each custom tile into a new game, and I didn't get an error. So I guess that isn't it.

Edit: I just checked, and other maps using the same tileset work fine. So there must be something wrong with just this one map...

...Another Edit: Aha! I fixed it! I'd copied an event from another map without changing it to a new sprite and that seems to have caused the error. Not quite sure why, but in any case I fixed it up and now it works!

No hard feelings, we're all cool, just don't double post within 24 hours. Congratulations for fixing the problem though! :D And you even put the resolved tag there, you earn an Internet Cookie and a Power Up! ~Love, Starrodkirby86

Blizzard

The error was caused by Blizz-ABS. I guess that you are using the Intelligent Passability feature and haven't recreated the Map_Data.abs file. I use the same passability system in my game and I encounter the same error when I don't make the game recreate the file. You need to recreate the file when you change tilesets.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.