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.

RGSS Question

Ok, I am trying to get text from a module in the end. This is what I have so far(Just an example)
Code:
module Cool
  New = {1 => "Yeah"}
end

(Some other class)
main
  @new = Cool::New[1]
end

def update
  @new.update
end

(Some other class)

def refresh
  self.contents.draw_text(0, 0, 320, 32, @new.to_s)
end
Just an example, I'm sure evrything else is set up right(The classes and defs and such, but maybe missing a method for this error...)

But everytime it tries to update, an error would say something like...

Undefined method 'update' for "Yeah":String

I'm thinking maybe I have to update it a different way or something, but I don't have any idea. Can someone help me please?
 

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