I have been using the balloon burst video tutorials to build a game by Dr Rafael Hernandez. I am having some major issues with the insert function. Here is the code:
  
local function spawnBalls()  
 local function spawn(e)  
  
 local b = ball.newBall("iPhone", m.rand(50, 75))  
  
 --Store the instance in the balls table  
 balls[b] = b  
  
 --Flag the balls for removal later  
 balls[b].remove = true  
  
  
 foreground:insert(balls[b])  
  
 end  
  
 spawn()  
  
 local tmr = timer.performWithDelay(frequency, spawn, 4)  
  
 end  
  If I try to insert the balls table (haha, lets be mature!) then I get a runtime error every time:
Runtime error
/Users/Kyle/Desktop/Project “Color Burst”/game.lua:137: bad argument #-2 to ‘insert’ (Proxy expected, got nil)
If I use any other object (text, rect, and images for example) it gives no error. Anyone else having this problem or know why it wont allow it? I have double checked as much code as I can and it is identical to the code in the video, but I CANNOT get it to work correctly. Thanks!
[import]uid: 9968 topic_id: 8573 reply_id: 308573[/import]
