Author Topic: GUI Profile Crashing Blockland [Solved]  (Read 2589 times)

I made a new GUI profile. But whenever I use it, it crashes Blockland. I have no idea why.
Code: [Select]
if(!isObject(DRPGWindowProfile))
{
new GuiControlProfile(DRPGWindowProfile)
{
tab = "0";
canKeyFocus = "0";
mouseOverSelected = "0";
modal = "1";
opaque = "1";
fillColor = "200 200 200 255";
fillColorHL = "200 200 200 255";
fillColorNA = "200 200 200 255";
border = "2";
borderThickness = "1";
borderColor = "0 0 0 255";
borderColorHL = "128 128 128 255";
borderColorNA = "64 64 64 255";
fontType = "Impact";
fontSize = "18";
fontColors[0] = "255 255 255 255";
fontColors[1] = "255 255 255 255";
fontColors[2] = "0 0 0 255";
fontColors[3] = "200 200 200 255";
fontColors[4] = "0 0 204 255";
fontColors[5] = "85 26 139 255";
fontColors[6] = "0 0 0 0";
fontColors[7] = "0 0 0 0";
fontColors[8] = "0 0 0 0";
fontColors[9] = "0 0 0 0";
fontColor = "255 255 255 255";
fontColorHL = "255 255 255 255";
fontColorNA = "0 0 0 255";
fontColorSEL = "200 200 200 255";
fontColorLink = "0 0 204 255";
fontColorLinkHL = "85 26 139 255";
doFontOutline = "0";
fontOutlineColor = "255 255 255 255";
justify = "center";
textOffset = "5 2";
autoSizeWidth = "0";
autoSizeHeight = "0";
returnTab = "0";
numbersOnly = "0";
cursorColor = "0 0 0 255";
bitmap = "Add-Ons/Client_DRPG/bitmaps/dprgWindow";

text = "";
hasBitmapArray = "1";
};
}
« Last Edit: October 01, 2013, 09:59:59 AM by jes00 »

Give us more information. Is it when it executes, or when you call it up to screen. Are you using canvas::setContent or canvas::pushDialog? Does Blockland crash before or after displaying it? Is that all the code in the entire project, or just the definition of the GUI?

Furthermore, you should be creating a new GuiControl, not a GuiControlProfile. That's probably your issue.
« Last Edit: October 01, 2013, 08:28:43 AM by $trinick »

Furthermore, you should be creating a new GuiControl, not a GuiControlProfile. That's probably your issue.
No he's doing that right

No he's doing that right
You're right, I failed to look at the content of the object. I thought he was creating a new GUI. My bad.

Give us more information. Is it when it executes, or when you call it up to screen. Are you using canvas::setContent or canvas::pushDialog? Does Blockland crash before or after displaying it? Is that all the code in the entire project, or just the definition of the GUI?
It's when it's called up to screen.

I'm using canvas::pushDialog, but it crashes even when I open it in the GUI editor and when I set something to have that profile, while in the GUI editor.

Blockland crashes before displaying it.

This is just the definition of the profile. Although I know for a fact that it's the profile that causing the crash, because when I don't make the profile. Everything is fine.

Also, when I use canvas::pushDialog and there is something in the GUI that uses that profile. Blockland crashes, but the console also says: GuiControl::awaken: failed onWake for obj: An object that uses that profile.

This might sound goofy but try using the default window bitmap and see if it makes a difference.  I had a similar issue a while ago when I was re-skinning Blockland and I guess it was a product of me accidentally drawing over one of the red lines in one of the UI files because when I repaired it, Blockland stopped crashing when I opened a GUI.

This might sound goofy but try using the default window bitmap and see if it makes a difference.  I had a similar issue a while ago when I was re-skinning Blockland and I guess it was a product of me accidentally drawing over one of the red lines in one of the UI files because when I repaired it, Blockland stopped crashing when I opened a GUI.
Weird... It is the bitmap that's crashing it.

But I didn't go over any of the red. Hmm. I dunno.

Mine:              Original:
         
« Last Edit: October 01, 2013, 09:55:47 AM by jes00 »

Weird... It is the bitmap that's crashing it.

But I didn't go over any of the red. Hmm. I dunno.

Mine:              Original:
         
The red is a a slightly more orange, dunno if that is the problem

That is the problem, Blockland looks for the color 255 0 0 as the dividers of the GUI images. (I'm 99% sure)
You need to paintcan the red-orange to full red.