* If your move and wrap functions are local, are they ABOVE those two lines in your code?
* At that point, does anything (such as errors) appear in the terminal? [import]uid: 7849 topic_id: 2645 reply_id: 8031[/import]
* If your move and wrap functions are local, are they ABOVE those two lines in your code?
* At that point, does anything (such as errors) appear in the terminal? [import]uid: 7849 topic_id: 2645 reply_id: 8031[/import]
Yes they are above, but they are not staked like that in the code they are under their functions.
The error:
/Desktop/D-Pad Demo/game.lua:124: attempt to perform arithmetic on field ‘x’ (a nil value)
Runtime script error at file game.lua line 124
On lines 124 and 125 I have this:
[blockcode]
player.x = player.x + motionx
player.y = player.y + motiony
[/blockcode]
This happens when I press the Menu button from the game screen.
-Gamexcb [import]uid: 8517 topic_id: 2645 reply_id: 8032[/import]
@Gamexcb: It seems like your object ‘player’ was unloaded at some point, and when you press the Menu button it is trying to access an attribute of player but it doesn’t exist anymore.
I’d probably have to see more of your source to help you out, I’m not sure if you’re comfortable with that. If you want to send me your source code you can at jb.11xi85 [at] gmail.com otherwise, we’ll try to get to the bottom of this little by little.
Look at where your player object is created, when you press the menu button, can you be certain that the object still exists? [import]uid: 7849 topic_id: 2645 reply_id: 8033[/import]
Here is the button press:
[blockcode]
function backbutton:tap()
director:changeScene(“menu”,“moveFromLeft”)
end
backbutton:addEventListener(“tap”, backbutton)
[/blockcode]
-Gamexcb
I’ll probably e-mail you the source tomorrow. [import]uid: 8517 topic_id: 2645 reply_id: 8036[/import]
I just fired myself
The links should work now for breakout and samurai.
Here they are as well
Samurai Kitchen
Carlos [import]uid: 24 topic_id: 2645 reply_id: 8037[/import]
thanks carlos
[import]uid: 7911 topic_id: 2645 reply_id: 8038[/import]
no problem. thanks for your patience while I resolved the issue…
carlos [import]uid: 24 topic_id: 2645 reply_id: 8039[/import]
no problem. thanks for your patience while I resolved the issue…
carlos [import]uid: 24 topic_id: 2645 reply_id: 8040[/import]
@Gamexcb: Thanks for sending your source. Going back to the code you posted above, just modify it to look like this instead:
[blockcode]
function backbutton:tap()
Runtime:removeEventListener( “enterFrame”, wrap )
Runtime:removeEventListener( “enterFrame”, move )
director:changeScene(“menu”,“moveFromLeft”)
end
backbutton:addEventListener(“tap”, backbutton)
[/blockcode]
When you specify an enterFrame event, unloading the module doesn’t stop it. What was happening was when you went BACK to the Menu scene, all of the objects were unloaded from game.lua but the “enterFrame” listener function was still going—they have to be stopped manually.
I think it’s because you specified them at the “Runtime” level, so simply unloading a module won’t stop those event listeners.
I modified the code to above and it worked perfectly for me. Let me know if that fixes it for you.
Hope that helps! [import]uid: 7849 topic_id: 2645 reply_id: 8046[/import]
I’m here tooo… Looks like Crank is getting Crankier.
[import]uid: 9457 topic_id: 2645 reply_id: 8050[/import]
I’m here too, just purchased my license…
My brain is rajjed with the coding, but I’m determined to get there
Ace [import]uid: 9899 topic_id: 2645 reply_id: 8058[/import]
I’m over here from GS too (Sparkyidr)
Looking forward to checking this out.
Really nice to see lots of familiar names in this thread already [import]uid: 10101 topic_id: 2645 reply_id: 8063[/import]
Haha looks like we making our on new post page here
Welcome exGSers [import]uid: 7911 topic_id: 2645 reply_id: 8083[/import]
Can we test on iDevice with trial subscription [import]uid: 7911 topic_id: 2645 reply_id: 8084[/import]
Dunno buddy, I’ve just paid for the subscription… Try it?
Ace [import]uid: 9899 topic_id: 2645 reply_id: 8085[/import]
I think you need a sub to build for device, buying our subscription tomorrow
// red. [import]uid: 7143 topic_id: 2645 reply_id: 8086[/import]
It makes sense that you would have to, or else you could have like 20 games ready, then in your trial, encode them and send them off to Apple without paying for your Corona sub
Ace [import]uid: 9899 topic_id: 2645 reply_id: 8087[/import]
Kinda what I thought might be a week or two before I can purchase and I was tryin to use the native.newTextBox but I think it only works on device unless I was doing something wrong [import]uid: 7911 topic_id: 2645 reply_id: 8088[/import]
Nah, native text box does only work on the device, not on the simulator which is a bit annoying that you have to compile to get it working. Mother Hoose has the same problem
Ace [import]uid: 9899 topic_id: 2645 reply_id: 8089[/import]
You can use the Xcode simulator build option, which is faster than on device testing. [import]uid: 54 topic_id: 2645 reply_id: 8090[/import]