random error message

J

jr carey

Guest
I'm getting this random error message, not sure whats causing it lol all it says is:

"Fatal Error: Can not create vertex Buffer of size 98304 bites 10709 vertex buffer allocated with the total size of 917664 kb"

anyone know what this means?
 
S

Supercoder

Guest
I can assume that an infinite loop in a draw event is causing the issue. Have you made any changes that would cause something of the sort? For example a while loop in a draw event, or even a loop from before broken by new code.
 
J

jr carey

Guest
nope, it says its coming from the parent event, which is telling all of its children to draw health bars, but I hardly if every use loops in the draw event
 
S

Supercoder

Guest
If you don't mind, could you please post the code in the parent's draw event? The issue could also be a pure programming error.
 
J

jr carey

Guest
here you go...this isn't all of it, but the rest of them are just copied with different object names in the "with statement"...I think my problem is being caused by the blend mode

//draws the health bar for the velvet wasp
with(velvet_wasp)
{
draw_self();
var bar = maxhealth;
// if armored is false draw the health bar only
if(armored == false)
{
draw_set_color(c_yellow)
draw_rectangle(self.x-10,self.y-38,self.x+(Ehealth/maxhealth)*bar,self.y-35,0)
}
// if armored is true draw both sprites and blend them
if(armored == true)
{
draw_set_blend_mode(bm_add) // this is where I think the problem is coming from because I'm blending it twice
draw_sprite_ext(spr_velvet_armor,0,self.x,self.y,image_xscale+.2,image_yscale+.2,direction,c_blue,armor/20)
draw_set_blend_mode(bm_normal)
// if armored is true and greater than 0 draw armor bar
if(armor>0)
{
draw_set_blend_mode(bm_add)
draw_set_color(c_blue)
draw_rectangle(self.x-10,self.y-38,self.x+(armor/maxhealth)*bar,self.y-35,0)
draw_set_blend_mode(bm_normal)
}
}
else
{
draw_set_color(c_yellow) // if armored is true but less than 0 draw health bar
draw_rectangle(self.x-10,self.y-38,self.x+(Ehealth/maxhealth)*bar,self.y-35,0)
}
draw_set_color(c_black)
draw_rectangle(self.x-10,self.y-38,self.x+bar,self.y-35,1)

}
 
S

Supercoder

Guest
I think I have it figured out, but I might be way off. The problem shouldn't be with the blending, that's fairly easy stuff for the computer. If you have a with statement in the parent event, every single child would be applying the drawing to every single child. Meaning 5 objects would be drawn 25 times. Of course, I might be way off, but something being drawn too many times would make sense for the error.
 
K

Karlabos

Guest
That piece of code doesn't seem like it's the reason of the problem, unless you have TOO much child objects (??)
 
J

jr carey

Guest
I think I have it figured out, but I might be way off. The problem shouldn't be with the blending, that's fairly easy stuff for the computer. If you have a with statement in the parent event, every single child would be applying the drawing to every single child. Meaning 5 objects would be drawn 25 times. Of course, I might be way off, but something being drawn too many times would make sense for the error.
I think you maybe correct, because the children are inheriting the parents events, and telling each object to draw it more than once, but why am I now just getting the error? it been fine for weeks lol, and even more so, a with statement in itself should cause an issue like if you have a object called "box" and you put "with(box)" inside of object "box" that should be an error but I guess they haven't added that, but good Idea! imma fix it
 
Top