Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Very Weird Error coming up...

When i move onto one of my maps, this error comes up.

http://i164.photobucket.com/albums/u9/r ... led234.jpg[/IMG]

I really don't get it, because it seems to be saying the multiplication function is a method... aaaghh! The line of code is this...

Code:
 #--------------------------------------------------------------------------
  # * 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
     [COLOR=Red] return z + $game_map.priorities[@tile_id]*32[/COLOR]
    # If character
    else
      # If height exceeds 32, then add 31
      return z + ((height > 32) ? 31 : 0)
    end
  end

I would really appreciate some help with this! Cheers

EDIT: I fixed it, but i'm still interested as to why it does it. It appears that it was cause by a Priority *5 tile being used on the very bottom line of squares when your making the map. Why does this happen?

-Jonathan
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top