I got a problem to get the color of the panel bmap

here is my code

Code:
void get_clr()
{
COLOR clr;	
var format; 
var pixel;
var clr_x,clr_y;

clr_x=mouse_pos.x;
clr_y=mouse_pos.y;

BMAP* hitMap = "color_btn.png";

var format=bmap_lock(hitMap,0);
var pixel=pixel_for_bmap(hitMap,clr_x,clr_y);

bmap_unlock(hitMap);
}



i got a script crash with this code


Last edited by GameScore; 08/20/12 19:04.