Announcement

Collapse
No announcement yet.

Delay function is not passing the player information

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Delay function is not passing the player information

    Hi,

    I'm trying to wait 5 seconds before saving my player data and it seems that "player" is nil when the SavePlayerAccount function runs.
    My code is:
    Code:
    Delay(5000, function(player)
    SavePlayerAccount(player)
    end)

    #2
    If you pass a variable through the function of a delay, you'll have to pass it after the end as well.

    It should look something like this
    Code:
    Delay(5000, function(player)
        SavePlayerAccount(player)
    end, player)
    Welcome to the community btw!

    Comment


      #3
      Oh damn! It works now, thank you very much!

      Thank you

      Comment

      Working...
      X