Jump to content

Function return value


kuwalda

Recommended Posts

Silly question, but how can I use this function to get those returned values?

    function findRaceWinner(raceToEnd) 
            if blueBerryRallyP and type(blueBerryRallyP) == 'table' then 
                local time, winner = math.huge 
                for thePlayer, theTime in pairs(blueBerryRallyP) do 
                    if theTime < time then 
                        winner, time = thePlayer, theTime           
                    end 
                end 
                return winner, time 
            end 
            return false 
    end 

Like how can I get or use those return winner, time values after calling function

setTimer ( findRaceWinner, 240000, 1, raceMap ) 

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...