sistemlogikadigital Posted February 13, 2019 Share Posted February 13, 2019 Here's the error : me.device.onReady(function onReady() { game.onload(); }); Quote Link to comment Share on other sites More sharing options...
PLAYERKILLERS Posted February 14, 2019 Share Posted February 14, 2019 I haven't used phonegap, but either there is an error in your game.js or the script tag for game.js has not been loaded. Make sure that game.js is imported and valid before you call game.onLoad(). Quote Link to comment Share on other sites More sharing options...
sistemlogikadigital Posted February 14, 2019 Author Share Posted February 14, 2019 6 hours ago, PLAYERKILLERS said: I haven't used phonegap, but either there is an error in your game.js or the script tag for game.js has not been loaded. Make sure that game.js is imported and valid before you call game.onLoad(). actually this is happened only on phonegap, on browser run fine. So i thinks there's no wrong in game.js Quote Link to comment Share on other sites More sharing options...
PLAYERKILLERS Posted February 15, 2019 Share Posted February 15, 2019 Does it provide a console where you can see other errors? It could be that the game.js file is not loaded. Quote Link to comment Share on other sites More sharing options...
sistemlogikadigital Posted February 15, 2019 Author Share Posted February 15, 2019 3 minutes ago, PLAYERKILLERS said: Does it provide a console where you can see other errors? It could be that the game.js file is not loaded. it does not provide console on phonegap andorid, so i need to user alert window to catch error. Yeah probably game.onload(); called first before game.js loaded, but i dont know why Quote Link to comment Share on other sites More sharing options...
PLAYERKILLERS Posted February 15, 2019 Share Posted February 15, 2019 Usually browsers load files sequentially, so the file should be imported before you call game.onload(). It might be that you need to declare resources elsewhere. If you feel like taking the extreme approach (somewhat sloppy) you might try just pasting everything into one huge inline script tag. My advice would be to review the phonegap manual first. I believe there is also an opensource alternative to phonegap now. You might have better results with that. Quote Link to comment Share on other sites More sharing options...
sistemlogikadigital Posted February 19, 2019 Author Share Posted February 19, 2019 On 2/15/2019 at 1:35 PM, PLAYERKILLERS said: Usually browsers load files sequentially, so the file should be imported before you call game.onload(). It might be that you need to declare resources elsewhere. If you feel like taking the extreme approach (somewhat sloppy) you might try just pasting everything into one huge inline script tag. My advice would be to review the phonegap manual first. I believe there is also an opensource alternative to phonegap now. You might have better results with that. i finally solved it by move all the code to index.html PLAYERKILLERS 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.