His code will work without editing another file. As he notes:
Whenever fish feast is dropped, call f:Show(), whenever you want the script to stop reminding, call f:Hide()
|
f:Show will start the timer, using that code, and f:Hide will stop it. Note that whatever code calls those functions must be in the same file as his snippet, and below it. Also of course, don't use another variable called f.
I believe line 7 is a syntax error, because it's basically just writing "true" or "false" on a line (although maybe Lua allows that variation, I haven't tried it). Try turning Lua errors on (which you should do in general anyway, especially while writing an addon). While you certainly could write line 7 in that sort of way, I don't see any reason not to just do this:
lua Code:
if UnitBuff("Player", "THE_BUFF_YOU'RE_LOOKING_FOR_HERE") then
self:Hide()
else
PlaySoundFile("SOME_SOUND_FILE_HERE")
end