Storyboard and credits problem

Not sure what’s going on but I created a scene named “credits.lua” and no matter what it generates an error. If I change the name to something else it loads just fine. 

The error is:

Attempt to call method ‘dispatchEvent’ (a nil value)

stack traceback:

    [C]: in function ‘dispatchEvent’

    ?: in function ‘gotoScene’

    …nts/Corona Projects/WNM 300 /Module 12/Game/home.lua:34: in function ‘_onRelease’

    ?: in function <?:135>

    ?: in function <?:218>

@soggybag, do you mind renaming credits.lua to something else and see if it fixes it?  I remember issues with naming a lua file “credit” or “credits” because it was reserved.  It may no longer be the case, but just to make sure the file name isn’t causing the problem for you.

Naomi

Actually I said as much, renaming the file to anything but “credits” works just fine.

I guess its related to this? http://docs.coronalabs.com/api/library/credits/index.html Better not use credits as a name me thinks.

a credits object/class thing, who’d of thunk it. Of course it’s deprecated ta’boot. That had to be it. Though, I was think it was me until tried changing the name to something else and things started working correctly.

@soggybag, do you mind renaming credits.lua to something else and see if it fixes it?  I remember issues with naming a lua file “credit” or “credits” because it was reserved.  It may no longer be the case, but just to make sure the file name isn’t causing the problem for you.

Naomi

Actually I said as much, renaming the file to anything but “credits” works just fine.

I guess its related to this? http://docs.coronalabs.com/api/library/credits/index.html Better not use credits as a name me thinks.

a credits object/class thing, who’d of thunk it. Of course it’s deprecated ta’boot. That had to be it. Though, I was think it was me until tried changing the name to something else and things started working correctly.