Jump to content

Help


FiGo

Recommended Posts

The code? That told you you are trying to compare a string "THIS IS A STRING" to a boolean false true -- those are booleans

Like this

if "TEXT" == true then --do something end

depending on your code the right approche may be

if "text" == tostring(VARIABLE) then -- do something end

As I said earlier we need the code to give an exact answer. Good luck.

Link to comment

function addNotification(accname, message)
        local accName = accname
        local account = getAccount(accname)
        local getaa = getAccountData(account, "unreadNotifications")
        if getaa then
            setAccountData(account, "unreadNotifications", getaa + 1)
        else
            setAccountData(account, "unreadNotifications", 1)
        end
        local date, time = getTimeDate()
        local final = "["..date.. " - "..time.."]"
        
        if (not fileExists("notifs/"..accName..".log")) then
            log[accname] = fileCreate("notifs/"..accName..".log")
        else
            log[accname] = fileOpen("notifs/"..accName..".log")
        end
        if (not log[accname]) then return end
        if (not fileExists("notifs/"..accName..".log")) then return end
        if (fileGetSize(log[accname]) == 0) then
            fileWrite(log[accname], final.." "..message)
        else
            fileSetPos(log[accname], 0)
            theLine = fileRead(log[accname], 9999999)
            fileWrite(log[accname], "\n"..final.." "..message)
        end
        fileClose(log[accname])
end

Edited by FiGo
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...