Error : Failed to Create Bitmap

ClockworkFate

Warper
Member
Joined
Feb 19, 2016
Messages
2
Reaction score
0
First Language
English
Primarily Uses
"Script 'Window Message' line 102: RGSSError occurred


Failed to Create Bitmap"


Okay, so the past few times I have loaded up my game in development, I have received this error. This, for my, is confusing because I do not know what is causing it. It just...appeared.


Now, first, before anyone asks, yes, I am tampering (seriously tampering) with the script of the game.


My issue is that the error is completely unrelated to anything I have done scripting wise.


From preliminary googling, I have discovered other people have had this issue as well and it has to do with corrupted images or game files. But which file specifically is corrupted? I can't freaking figure it out. Help please? (Oh I have replaced and re-employed the defaults for the window, so it can't be that) 


Help is much appreciated! :-D
 

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
970
Reaction score
810
First Language
English
Primarily Uses
N/A
Try to think back about what you've recently tampered with. Create a new project, then use diffchecker.com to see what things you'd changed.


I doubt it's a corrupt image issue, more likely, it's due to you erasing a variable that contained an image name, or moved an image, or just erased a definition somewhere. I'm not too sure the cause, but it would be more helpful to be able to see what changes you've made, since many, many, things can cause that error.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


What's on line 102 of Window_Message?  Copy the whole method that contains that line, then paste it here, so we can see it in context, and highlight which line is 102.
 

ClockworkFate

Warper
Member
Joined
Feb 19, 2016
Messages
2
Reaction score
0
First Language
English
Primarily Uses
mjshi - okay, I'll try that. Thanks. Oh, and thanks a bunch. I went back and replaced new script with the old then re-did it to find the error.


Although, what I was tampering with was the Window_EquipSlot, Window_EquipCommand, Scene_Equip.


[Edit] - YES! FOUND IT! It was in the Base_Item script component that was causing the error, for some reason.


All of this in the name of renaming/excluding options/choices in the game. If anyone can think of any better way to rename equip slots or change options that would also be appreciated. -> This still stands if anyone wants to help. :-D
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
This is that method from the default script:

Code:
  def create_back_bitmap
    @back_bitmap = Bitmap.new(width, height)     <<<< this is line 102
    rect1 = Rect.new(0, 0, width, 12)
    rect2 = Rect.new(0, 12, width, height - 24)
    rect3 = Rect.new(0, height - 12, width, 12)
    @back_bitmap.gradient_fill_rect(rect1, back_color2, back_color1, true)
    @back_bitmap.fill_rect(rect2, back_color1)
    @back_bitmap.gradient_fill_rect(rect3, back_color1, back_color2, true)
  end


With all your tinkering, have you been changing the default scripts, or adding new scripts?


If you haven't made any changes to that, and that's what you see on line 102, then it's likely that either width or height are 0.  To test, change the method so it looks like this:

Code:
  def create_back_bitmap
    p width
    p height
    @back_bitmap = Bitmap.new(width, height)
    rect1 = Rect.new(0, 0, width, 12)
    rect2 = Rect.new(0, 12, width, height - 24)
    rect3 = Rect.new(0, height - 12, width, 12)
    @back_bitmap.gradient_fill_rect(rect1, back_color2, back_color1, true)
    @back_bitmap.fill_rect(rect2, back_color1)
    @back_bitmap.gradient_fill_rect(rect3, back_color1, back_color2, true)
  end
and play with the console turned on.  


When the game crashes, see what's been output in the console.  I expect there'll be a 0 or null value in there.  If you can't decipher it, get a screenshot of the console at that point and post it here.


Did you look to see if there were existing scripts that do what you want to do?  In fact, to rename slots you should just have to make some minor modifications in the Vocab script.


But those scripts you mentioned don't have anything to do with the message window.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

On my journey of character rework: I had this character, she was meant to be just a princess that joins your party. And at long term she was just uninteresting... So I tweaked her to be a rebel agaisn't the royalty before meeting up with the party.

Quick tip for any other ametuer pixel artists! When trying to create a colour palette, enabling Antialiasing can speed up the process of creating different shades! Just place your lightest colour and your darkest colour next to each other, select both pixels, and stretch it out!
Revolutionizing the JRPG Industry: Knocking on Doors.

Take that, murderhobos.
Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.

Forum statistics

Threads
106,054
Messages
1,018,580
Members
137,843
Latest member
Betwixt000
Top