Help - Search - Members - Calendar
Full Version: RPGXP "X Menu" Support
RPG RPG Revolution Forums > Scripting > Script Development and Support > RGSS
Avarius
Hi folks,

I tried importing a custom menu script called "X Menu", however whenever I try to access the menu in-game I get the error "no implicit conversion from nil to integer" for line 253 "self.contents.font.size = $fontsize". I have tried putting a "#" before the line, but then it gets stuck on the following line that involves font size. Any suggestions for how to fix this?

Here's the script if you need to look it over

LINK
stripe103
Sounds like fontsize doesn't have a value.
Before that line or before you open the menu, try to have a line or script call that says
CODE
$fontsize = 18
Avarius
QUOTE (stripe103 @ Feb 9 2012, 01:16 PM) *
Sounds like fontsize doesn't have a value.
Before that line or before you open the menu, try to have a line or script call that says
CODE
$fontsize = 18


Unbelievable. That's all it took. Thank you Stripe. Everything is working well now smile.gif

Love this community
Jens of Zanicuud
It seems that script was created for first japanese version of RMXP.

RGSS100J.dll hasn't a default font for bitmaps, and as a result in the 1.0 version's Main script there were these two global variables:

CODE
$fontface = "Arial"
$fontsize  = 24


This allowed the maker to change default font in a simple way, but was later removed in the 1.02 English version, since RGSS102E.dll included a default bitmap font module.
Many old scripts employed these two variables, however.

Jens
Avarius
Jens, the depth of your scripting knowledge always astounds me. I want you as a sponsor!

Anyway thanks for your input on my post
Jens of Zanicuud
Thanks, but I'm just a spare-time-scripter who has great interest in deeply understanding things.

BTW, this is the one thing which changes from one version to another one.
If you search for the first RMXP scripts architecture (which - alas! - is the one employed even by cracked versions), you'll find it is exaclty as it is ATM, with those two variables and with these two lines below each Window class initialize.

CODE
self.contents = Bitmap.new(width-32,height -32)
#the two lines I referred to
self.contents.font.name = $fontface
self.contents.font.size = $fontsize


Jens
Avarius
Jens, mind if I PM you with scripting questions in the future?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.