Auto-translated
Either put it in the array at index i, or simply iterate through the first two elements of the array first, and then through the rest. Don't compare with nil, but with true. Or, as I think, still with false, but then for equality, and not the other way around.
function regF()
if IsObjectExist('mon')=true then
MessageBox(GetMapDataPath().."mes2.txt");
else MessageBox(GetMapDataPath().."mes.txt");
end;
end;
Trigger(REGION_ENTER_WITHOUT_STOP_TRIGGER, "reg", "regF");?