[XP] Simple issue I can't figure out

Started by sasofrass, June 25, 2011, 05:48:25 pm

Previous topic - Next topic

sasofrass

zzz

Basically, I'd like to display variables in the status menu and I can't figure this one out - I've googled and the answer was probably there but I failed to find it.

self.contents.draw_text(220+155, 280, 200, 32, $game_variables[1] + " / 5")

What am I doing wrong :(

ForeverZer0

Unless $game_variables[5] is a string, which it is likely not, this won't work.
Add a ".to_s" on it so that it is $game_variables[5].to_s

Or use this line:

self.contents.draw_text(375, 280, 200, 32, "#{$game_variables[5]} /5")

I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.