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.

SERIOUS Problem

Well, I've nearly finished my new game, but I have run into a problem.
I'm using a script to change the title screen to a map. I can start the game up time, but when I try to teleport to another map, I keep getting an error saying that the line
return z + $game_map.priorities[@tile_id] * 32
is wrong. It is line 274 of Game_Character 1.
To my knowledge, I have not changed it from the default.
Does anyone have any bright ideas on how to fix it? Thanks for your time.
 
Script 'Game_Character 1' line 274: NoMethodError occured.
undefined method '*' for nil:NilClass

Thats the error message. I can't understand it, because Game_Character 1 has not been changed. It is the RMXP default. Also, when I tested my game a few days before, it had not come up with an error message but now it does and I haven't changed anything in the time in-between.
 

knmt

Member

This error occurs when you're teleporting to another map from the title scene right? Then check the map you're teleporting to , also you should open up the database and press the ok button at least one more time . Sometimes I got this problem too when the tileset is not yet updated...and I don't modify anything either...Open the database and press ok...that's what I did...
 
Well all $data variables are initialized right after the title sprite shows up, but the $game variables are started only after you choose either to start or continue a game. That way, it would be impossible to use $game_map inside the Title scene without modifications, otherwise when you try to access it, it will return nil. Check your custom script to see if it initializes the $game variables before using them.
 

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