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.

Having trouble on a Conversion system

Hi, I'm trying to create a let me translate, Fighter into a string that I can input into Metm's Visual Equip Screen. I had done it before, but since then my PC was reformatted and now being out of Ruby for a while can't figure out where I'm going wrong. One of the features on this system.

Here's what I thought would go in:
Code:
      return ["FC/Duty/FC (" + actor.class_id.to_s + ").png",0] if item_id == 1

This doe then give me a undefined method error for class_id. Last time I check class_id was a method of Game_Actor, right?
 
Make sure your actor variable is a Game_Actor. Chances are, it is nil.

Secondly, this can be simplified.

Code:
return ["FC/Duty/FC (#{actor.class_id}).png", 0] if item_id == 1

Just put "p actor" above that line to see what you come up with.

PS: Moved to Help Forum.
 

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