Auto-translated
startThread(kingblok); this launches the function for the first time, and the function will continue to run at intervals using sleep() until the task is completed. It throws an error because there are no parentheses next to kingblok.
function kingblok()
while GetObjectiveState("sec2", --replace_with_player_id) ~= 3 do
sleep(5);
end;
SetRegionBlocked("block", nil, -1);
end;
startThread(kingblok);
function kingblok()
while GetObjectiveState("sec2", --replace_with_player_id) ~= 3 do
sleep(5);
end;
SetRegionBlocked("block", nil, -1);
end;
startThread(kingblok);