i am trying to make a simple thing by creating panel and after its on the screen deleting it. But then i create panel and try to remove it the program sends me an error message which is W1516 Invalid pointer freed -
!!! HELP !!!
This is my code:
#include <acknex.h>;
#include <default.c>;
BMAP* bullet_png = "missile.png";
PANEL* panel;
function main()
{
video_mode = 7;
video_screen = 2;
while(1)
{
if(key_p)
{
panel = pan_create("bmap = bullet_png;",1);
panel.pos_x = 300;
panel.pos_y = 300;
panel.layer = 5;
panel.flags = VISIBLE;
}
if(key_r)
{
pan_remove(panel);
}
wait(1);
}
}
P.S. Oh yeah i am using 1.70.1 V