Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> RPGXP "X Menu" Support, Error with Custom Menu script
Avarius
post Feb 9 2012, 11:42 AM
Post #1


Level 7
Group Icon

Group: Member
Posts: 95
Type: Artist
RM Skill: Intermediate




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

This post has been edited by Avarius: Feb 9 2012, 11:50 AM


__________________________
Go to the top of the page
 
+Quote Post
   
stripe103
post Feb 9 2012, 01:16 PM
Post #2


PHP ERROR: Couldn't get value from UInteger. Value too large
Group Icon

Group: Revolutionary
Posts: 737
Type: Mapper
RM Skill: Intermediate




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


This post has been edited by stripe103: Feb 9 2012, 01:16 PM


__________________________

By Axerax

The rest of my sig



Go to the top of the page
 
+Quote Post
   
Avarius
post Feb 10 2012, 10:24 AM
Post #3


Level 7
Group Icon

Group: Member
Posts: 95
Type: Artist
RM Skill: Intermediate




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


__________________________
Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Feb 10 2012, 12:28 PM
Post #4


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 904
Type: Scripter
RM Skill: Skilled
Rev Points: 120




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

This post has been edited by Jens of Zanicuud: Feb 10 2012, 12:29 PM


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   
Avarius
post Feb 11 2012, 02:34 AM
Post #5


Level 7
Group Icon

Group: Member
Posts: 95
Type: Artist
RM Skill: Intermediate




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

Anyway thanks for your input on my post


__________________________
Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Feb 11 2012, 02:52 AM
Post #6


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 904
Type: Scripter
RM Skill: Skilled
Rev Points: 120




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


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   
Avarius
post Feb 11 2012, 01:27 PM
Post #7


Level 7
Group Icon

Group: Member
Posts: 95
Type: Artist
RM Skill: Intermediate




Jens, mind if I PM you with scripting questions in the future?


__________________________
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 25th May 2013 - 10:20 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker