Quote from: prissi on Yesterday at 11:53:52 AMMaybe try self-compile.
function my_compass()
{
local c_max = {x = map_siz.x-1, y = map_siz.y-1}
local c = coord(0,0)
local text = c.tostring()
local res_c = {x = 0, y = 0}
local ttx = ""
local siz = text.len()
for(local j=0;j<siz;j++){
local tx = format("%c",text[j])
try {
tx.tointeger()
}
catch(ev) {
if(tx==","){
res_c.x = ttx.tointeger()
ttx = ""
continue
}
continue
}
ttx+=tx
if(j == siz-1){
res_c.y = ttx.tointeger()
}
}
//gui.add_message("Res: "+ res_c.x +" -- "+res_c.y)
//gui.add_message("MAX: "+ c_max.x +" -- "+c_max.y)
if(res_c.x == 0 && res_c.y == 0){
//gui.add_message("N")
return 0
}
else if(res_c.x == c_max.y && res_c.y == 0){
//gui.add_message("W")
return 1
}
else if(res_c.x == c_max.x && res_c.y == c_max.y){
//gui.add_message("S")
return 2
}
else if(res_c.x == 0 && res_c.y == c_max.x){
//gui.add_message("E")
return 3
}
return null
}
Quote from: Yona-TYT on Yesterday at 11:25:56 AMJust like there is a "start_game()" function, maybe a function that is called every time a save is made could help?, although I don't know if this already exists (I don't think so).
Quote from: prissi on Yesterday at 11:45:43 AM...
So how to reproduce the error?