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.

Error Whe create new atributtes

im creating new atributtes on RMXP, i create one called "vit" to represent the vitallity..

but i got an error

i created some methods

On Game_Actor
Code:
 

#--------------------------------------------------------------------------

  # - Definição da Base de Vitalidade

  #--------------------------------------------------------------------------

 

  def base_vit

    n = 5

    return [[n, 1].max, 999].min

  end

 

PS: I addicted a variable on "Setup(actor id)" called @vit_plus = 0

and a method in game_battler

Code:
 

#--------------------------------------------------------------------------

  # - Definição da Vitalidade

  #--------------------------------------------------------------------------

 

  def vit

    n = [[base_vit + @vit_plus, 1].max, 999].min

    n = [[Integer(n), 1].max, 999].min

    return n

  end

 

PS2: In Game_Battler i addicted too a variable @vit_plus = 0


But i got an error

errorrag.jpg


whats wrong?
 

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