Yes, you can't specify variables in the panel definition. They can only be changed within a function. There's no need for 'pan_setpos' because you can directly modify the positon with 'PANEL*.pos_x/pos_y'...
Code:
var gridx[5] = {0,32,64,96,128};
var gridy[5] = {0,32,64,96,128}; // bla bla
BMAP* panel_bmap = "image.bmp";
void CreateGrid()
{
PANEL* p = pan_create("",1);
p.bmap = panel_bmap;
p.pos_x = gridx[0]; p.pos_y = gridy[0];
set(p,SHOW);
}
Of course, this is tedious, so let the computer do the work...