kuwalda Posted June 17, 2014 Share Posted June 17, 2014 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
TAPL Posted June 17, 2014 Share Posted June 17, 2014 setTimer(function() local winner, time = findRaceWinner(raceMap) end, 240000, 1) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now