Jump to content

[HELP] setTimer


Recommended Posts

Hi, i ran into a problem.

 

local playerTimer = {}

 

                playerTimer[source] = setTimer(function()    
                      outputChatBox("Player  "..getPlayerName(source).." has been unmuted.",  root,  255,  0,  0)  -- LINE 14
                    setMuted(source, false)                            
                  end, duration*60000, 1)

DEBUG: 

sourceS line 14 - Bad argument @ 'getPlayerName' [Expected element at argument 1, got nil]

sourceS line 14 - attempt to concatenate a boolean value

 

 

What's the problem?

Link to comment

Someone?

 

 

**EDIT**

 

fixed by myself.

 

 

                playerTimer[source] = setTimer(function(source, _)                            
                    outputChatBox(tostring(getPlayerName(source)))                
                      outputChatBox("player "..getPlayerName(source).." has been unmuted.", root, 255, 0, 0)
                    setMuted(source, false)                
                end, duration*60000, 1, source)    -- FIXED HERE

 

Edited by TheMOG
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...