Runtime error
?:0: attempt to call method ‘dispatchEvent’ (a nil value)
stack traceback:
[C]: in function ‘dispatchEvent’
?: in function ‘gotoScene’
/Users/Reisig/Desktop/Perplex 4/main.lua:9: in main chunk
Runtime error: ?:0: attempt to call method ‘dispatchEvent’ (a nil value)
All I have in my main.lua is the following:
[lua]local storyboard = require “storyboard”
I’m transitioning from director to storyboard and can’t even get going. Thanks for any help [import]uid: 46082 topic_id: 25596 reply_id: 325596[/import]
I feel your pain! I am also new to storyboard (and programming in general). Am starting to tangle out switching to Storyboard from Director. Maybe some of the following will help:
Also, if you don’t forward declare all of your variables at the top of each lua file, you’ll get all manner of errors.
Lastly, I blindly followed the sample template provided by Ansca, which calls purgeScene under the EnterScene event. Just now realized that this was the source of my troubles in trying to reload a scene (i.e., user hits the menu button and then navigates back to a scene that was already loaded) Using purgeScene, however, not all of the scene is reloaded. If I replace purgeScene with removeScene, somehow it all works nicely.
Hope any/all of this helps,
Chris
p.s. want to reiterate that I am pretty new to all of this, so there is a distinct possibility that what I’m doing falls under the category of “fudging” - take with a grain of salt! [import]uid: 97836 topic_id: 25596 reply_id: 104258[/import]
hi,
In my app I have multiple screen. Every screen works fine independently. I have a home screen from where I can go to any of the screen. My problem is , when i switch in squence like homescreen to 1 , homeScreen to 2 and so on , as soon as I reached 6, every thing goes of only some part of homescreen remains. But if I go directly from homeScreen to 6 it works fine. it showing me the following error:
[blockcode]
Runtime error
/Users/abc/Desktop/PROJECT/Six.lua:12: attempt to index global ‘display’ (a nil value)
stack traceback:
[C]: ?
[C]: in function ‘error’
?: in function ‘gotoScene’
…abc/Desktop/PROJECT/HomeScreen.lua:268: in function <…abc> ?: in function <?:229> [/blockcode]
hi,
In my app I have multiple screen. Every screen works fine independently. I have a home screen from where I can go to any of the screen. My problem is , when i switch in squence like homescreen to 1 , homeScreen to 2 and so on , as soon as I reached 6, every thing goes of only some part of homescreen remains. But if I go directly from homeScreen to 6 it works fine. it showing me the following error:
[blockcode]
Runtime error
/Users/abc/Desktop/PROJECT/Six.lua:12: attempt to index global ‘display’ (a nil value)
stack traceback:
[C]: ?
[C]: in function ‘error’
?: in function ‘gotoScene’
…abc/Desktop/PROJECT/HomeScreen.lua:268: in function <…abc> ?: in function <?:229> [/blockcode]