Quote: "You set a value called area_length before your call to imgmap_create"
Thanks again Mobiius, but this is not the case. I dind't post the whole part of the code which is the following:
i as integer
j as integer
area_length as integer
grid as integer
grid_length as integer
grid_p as integer // number of pages of each grid
grid_r as integer // number of rows of each grid
grid_c as integer // number of cols of each grid
img_filename as string
data_filename as string
img_filename = basemapname + ".png"
data_filename = basemapname + ".json"
imgmap_Create(m.map, img_filename, data_filename, 0.0, 0.0, 100.0, 100.0)
imgmap_SetVisible(m.map, 0)
area_length = imgmap_areaGetCount(m.map) - 1
m.area.length = area_length
for i = 0 to area_length
img_filename = m.map.shape[i].name + ".png"
data_filename = m.map.shape[i].name + ".json"
imgmap_Create(m.area[i].map, img_filename, data_filename, 0.0, 0.0, 100.0, 100.0)
imgmap_SetVisible(m.area[i].map, 0)
grid_length = grid_length + imgmap_areaGetCount(m.area[i].map)
next i
// create grid for each sub area
for i = 0 to area_length
grid_length = m.area[i].map.shape.length
m.area[i].place.length = grid_length
for j = 0 to grid_length
// Format of area name 'xxx.a.b.c', where xxx: name, a: number of pages in grid, b: number of rows of grid, c: number of cols of grid
grid_p = Val(GetStringToken2(m.area[i].map.shape[j].name, ".", 2))
grid_r = Val(GetStringToken2(m.area[i].map.shape[j].name, ".", 3))
grid_c = Val(GetStringToken2(m.area[i].map.shape[j].name, ".", 4))
m.area[i].place[j].id = Val(GetStringToken2(m.area[i].map.shape[j].name, ".", 5))
grid_Create(m.area[i].place[j].grid, 0.0, 0.0, 15.0, 15.0, grid_r, grid_c, grid_p, "gslot.png", theApp.font, 4.0)
grid_AllignX(m.area[i].place[j].grid, 1)
grid_AllignY(m.area[i].place[j].grid, 1)
grid = grid + 1
next j
next i
map_Reset(m
What drives me crazy, it's the fact that the same code runs without problem under my windows PC AND the tablet Samsung Galaxy TAB S2
I've attached the APK file. Could you please test it in your android device and let me know if it runs?