Calling transition.pause() and then transition.cancel()

Please add your config.lua and build.settings to the zip file and use the FIle and Bug at the top of the page.  Looks like transition.pause() might need investigated.  This will get it on the engineering schedule.

Rob

Done. Thanks for your help. I submitted this bug quite a while ago, I hope this second submission is noticed!

Current Case#: 32567

While I have you, is it ever necessary, when calling a function to precede it with a local variable?  (say, “local draw = draw()” in the above example) ?

The example you listed will create a variable named draw that is scoped to it’s containing block of code (i.e. if you did it inside an “if” statement, it’s only visible to the block inside the if statement, if you did it inside a function, it’s only visible to that function, etc.).  The contents of that variable will be the value returned by the draw() function.  Your draw function above doesn’t return anything, so your variable named draw will contain nil.

Rob

Alright, that makes sense. 

A related question:  

Say “draw()” is actually a function meant for spawning display objects, and it returns said display objects.  Within the draw function, the display objects are localized properly into a table.

However, draw is called from another generic function, and draw() is not preceded by a variable. 

Must I worry about the 1st instance of draw, even though its returned objects are already localized someplace else?

local spawns = {} local function draw() --I create an object, --assign and localize it to a table index, and --return end local function start() --other stuff-- draw() -- is this call safe, i.e. it won't create a global/cause a leak? end

If you do not capture the returned value, the local variable will be cleared, but allocated memory attached to it wont and you end up loosing a handle to that memory and you wont be able to free it up.

So yes, not capturing that first object is a problem.

Rob