Main Menu
  • Welcome to The RPG Maker Resource Kit.

Fixnum into String

Started by darthatron, February 07, 2007, 12:44:06 AM

0 Members and 1 Guest are viewing this topic.

darthatron

Hey guys, I just wanted to know if there was a way to show a variable in a hud through Script...?

    self.contents.draw_text(384, 16, 120, 32, $game_variables[0012])

That code doesn't work, so help would be very good. :)

Blizzard

2 mistakes. It should be

    self.contents.draw_text(384, 16, 120, 32, $game_variables[12].to_s)

.to_s converts values into strings.
And leading zeroes can cause bugs.
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!

darthatron

Thnaks for that, works great! :)