Jump to content

[HELP] attempt to perform arithmetic on a boolean value


Mamikey

Recommended Posts

addCommandHandler("vipsurem",function(plr)
if plr:getData("loggedin") == 1 then
    if plr:getData("vip") <= 0  then
        plr:outputChat("[!]#ffffff Vip değilsiniz.",255,0,0,true)
    return end
    local dbid = getElementData(plr, "dbid")
    local remainingSeconds = secondsToTimeDesc(math.ceil(plr:getData("vip_zaman")/10000000000))

    plr:outputChat("[!]#ffffff "..remainingSeconds.." sonra sona erecek.", 100,100,255,true)
    end
end)

please help me fix it..

Link to comment
  • Moderators
20 minutes ago, Mamikey said:

@Patrick I understand, Brother, Can you throw me the corrected version of the line?

The problem is somewhere else where you set this element data, here you can do only a value check.

addCommandHandler("vipsurem",function(plr)
  if plr:getData("loggedin") == 1 then
      if plr:getData("vip") <= 0  then
          plr:outputChat("[!]#ffffff Vip değilsiniz.",255,0,0,true)
          return
      end
      local dbid = getElementData(plr, "dbid")
      local zaman = plr:getData("vip_zaman")
      if zaman and tonumber(zaman) then -- is it a number?
          local remainingSeconds = secondsToTimeDesc(math.ceil(tonumber(zaman)/10000000000))

          plr:outputChat("[!]#ffffff "..remainingSeconds.." sonra sona erecek.", 100,100,255,true)
      end
  end
end)

 

Link to comment

@Patrick sorry, man, I threw you the wrong codes.. the codes below were original. Can you fix me this line?

 

addCommandHandler("vipsurem",function(plr)
if plr:getData("loggedin") == 1 then
    if plr:getData("vip") <= 0  then
        plr:outputChat("[!]#ffffff Vip değilsiniz.",255,0,0,true)
    return end
    local dbid = getElementData(plr, "dbid")
    local remainingSeconds = secondsToTimeDesc(math.ceil(getTimerDetails(tablo[dbid].sayac)/1000))

    plr:outputChat("[!]#ffffff "..remainingSeconds.." sonra sona erecek.", 100,100,255,true)
    end
end)
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...