RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Is it possible?...

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 88
I'm scared of my grandma. Wouldn't you be?
 ??? I was wondering if you could incorperate in-game variables into windows. For example: You want the number that variable #1 equals in a common pop up window. Would you use anything other than the draw_text method? When I tried that, it said it could not convert fixnum to string. Please help. Thanks! ???
« Last Edit: October 31, 2006, 09:23:46 PM by J-Crew »

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
You can use $game_variables[X] where X is the ID to refer to variables. And you need to use following syntax for the draw_text:

Code: [Select]
self.contents.draw_text(x, y, w, h, string, align)
(but you know that already.)

You should also be careful with strings. Numbers are not strings until you "convert" them to such with .to_s

For example:

Code: [Select]
num = 5
self.contents.draw_text(0, 0, 320, 32, 3.to_s + " - 1 is " + num.to_s)

You will get as output

Quote
3 - 1 is 5

But using

Code: [Select]
num = 5
self.contents.draw_text(0, 0, 320, 32, 2 + " - 1 is " + num)

will result in the same typeerror you just got.
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!

**
Rep:
Level 88
I'm scared of my grandma. Wouldn't you be?
You my friend ... are the best! I can't thank you enough for the help.