performWithDelay timer help

local thresholds={} local balloons={} local \_score=0 local balloon=require("balloon")

I have seperate balloon.lua file which is why the above line says require(“balloon”)

local function spawnBalloons( number )     local function spawn(e)     local b=balloon.newBalloon(m.random(50,100))        balloons[b]=b        balloons[b].x=m.random(\_W-400,\_W-50)        --balloons[b].remove=true        if(e.count==number) then            timer.cancel(tmr)            --tmr=nil        end     end          tmr=timer.performWtihDelay(2000, spawn, number)    end spawnBalloons(5)

When i run my code i get the error attempt to call field performWithDelay (a nil value). What exactly is wrong with the code? My timer code seems to be perfect.

The problem seems to be a typo. You’ve put timer.performWtihDelay instead of time.performWithDelay.

The problem seems to be a typo. You’ve put timer.performWtihDelay instead of time.performWithDelay.