io.open and os.date
Posted: Fri Oct 07, 2011 12:59 am
Hi all,
Standing on the shoulder of giants I often tweak someone elses code to suit my needs. If I use io.open and os.date in any rombot related script it works fine but if I use them in code that used in interface\addons such as PetAutoEvent the code just doesn't get executed. I've put chat window messages before and after the code and it's like the script aborts at that point. I use exactly the same code in both cases.....
I've also tried putting explicit paths in for the filename, such ""PetEvents.log" and "C:\PetEvents.log".
Any tips?
Thanks.
Standing on the shoulder of giants I often tweak someone elses code to suit my needs. If I use io.open and os.date in any rombot related script it works fine but if I use them in code that used in interface\addons such as PetAutoEvent the code just doesn't get executed. I've put chat window messages before and after the code and it's like the script aborts at that point. I use exactly the same code in both cases.....
Code: Select all
local filename = getExecutionPath() .. "/logs/PetEvents.log";
local file, err = io.open(filename, "a+");Any tips?
Thanks.