Here it is a little different because it is an addon ESO that uses this .lua so I did a workaround to avoid this error, not only posted the code to workaround to become clean but below is the complete code.
Lua Code:
function file_exists(name)
local f=io.open(name,"r")
if f~=nil then io.close(f) return true else return false end
end
function PTBR_LoadMedia(event, name) -- Initialize Player group events
if file_exists("controlador.dat") then
local dir_MidiaBR = "TraducaoPortuguesBR/Media/BR_logo.bik"
if file_exists(dir_MidiaBR) then
os.remove("../../depot/Video/BR_logo.bik")
os.rename(dir_MidiaBR, "../../depot/Video/BR_logo.bik")
end
PlayVideo("Video/BR_logo.bik", false, 1)
os.remove("controlador.dat")
end
end
if not file_exists("controlador.dat") then
GetEventManager():RegisterForEvent("TraducaoPortuguesBR", EVENT_ADD_ON_LOADED, PTBR_LoadMedia)
arquivo = assert(io.open("controlador.dat", "w"), "ops one error!");
arquivo:write("Blocks Logo crazy Executions Translation\n");
arquivo:flush()
io.close(arquivo);
end
Still thank all the help