Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Script problems once again...

Hey, I downloaded the script and demo for the Final Fantasy X-2 CMS, and I'm having a boatload of trouble because of my apparent lack of scripting knowledge.

I am getting this error message:

http://i35.photobucket.com/albums/d172/ ... z/ohno.png[/img]

And here is line 1855:

Code:
self.contents.font.size = $fontsize

And here is a link to the script itself:

http://www.rmxp.org/forums/showthread.php?t=2778

If anybody could help me, that would be great.

And keep in mind that scripting is my weakest point when it comes to RMXP.
 
The script is looking for a global variable ($fontsize) which is supposed to hold a value like 12, 32 or whatever size your displayed font is supposed to be. Because you don't even have that global variable, it's getting a nil value instead of an actual numeric value.

It is typically accompanied by another global variable called $fontname (or $fontface) which is supposed to hold the name of the font, like "Arial" or "Times New Roman" or whatever you plug in.

(It woulda been nice if they had it set up in a configuration section. Aw, maybe they do. I didn't look.)

You have two choices.
1) Remove any lines that request $fontsize and $fontname because 'default' systems typically have just the one size (boring)...
or
2) Add $fontsize and $fontname into your 'Main' script just before it calls the $scene = Scene_Title.new line, and define what font and fontsize you're using in that menu (yeesh, I hate editing default scripts).
 
I don't know if this helps, but I added those to my Main script long ago because I was getting errors (with the game, not the CMS), and it has been working fine until now.

:)

EDIT: I think I figured out this problem. I copied the Main from the demo into my project. Thank you for all your help.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top