I was trying the new Corona Cloud service so I just tried some new API. I followed the instruction but when I try on my tablet (Android) It didn’t work, just a black screen. This is my code:
local CC\_Access\_Key = "MY\_ACCESS\_KEY" local CC\_Secret\_Key = "MY\_SECRET\_KEY" cloud = require ( "cloud" ) local currentAuthToken = "" local function authListener( event ) if ( event.type == "loggedIn" or event.type == "facebookLoggedIn" or event.type == "sessionLoggedIn" ) then if not ( event.error ) then currentAuthToken = cloud.authToken native.showAlert( "Login Successful!", "", {"OK"} ) else native.showAlert( "Login Error!", event.error, {"OK"} ) end elseif ( event.type == "registerUser" ) then if not ( event.error ) then else native.showAlert( "Registration Error!", event.error, {"OK"} ) end end end cloud.init( CC\_Access\_Key, CC\_Secret\_Key, authListener ) local params = { accessKey = CC\_Access\_Key, secretKey = CC\_Secret\_Key, } gameNetwork.init( "corona", params ) gameNetwork.show( "dashboard" )
How could I see what was the error? What’s wrong in my code?
Problem solved!! I was missing the cloud_assets folder! Now this is my code:
local gameNetwork = require "gameNetwork\_corona\_prototype" local CC\_Access\_Key = "MY\_ACCESS\_KEY" local CC\_Secret\_Key = "MY\_SECRET\_KEY" local params = { accessKey = CC\_Access\_Key, secretKey = CC\_Secret\_Key, } gameNetwork.init( "corona", params ) gameNetwork.show( "dashboard" )
But now I have a new problem…I was trying to use the “gameNetwork_corona_prototype” file instead of the standard one “gameNetwork”, and I noticed that if I use a resolution that is different from 320x480 in the config.lua file, the first screen that asks you to register or login, is incorrectly displayed (I mean that the words are out of the frame). I just wanted to ask you if that is going to be fixed.
Indeed, the current implementation only displays correctly with a 320x480 resolution set in your configuration. Thus the name “prototype” on the UI repository.
We are working on it, it is however hard for me to give you an estimate on this.
If you’re doing the “corona” version you are likely having the same issues as those using the opensourced version on github. It’s the same code. If you are having problems with “gamecenter” then we need to look at it.
Problem solved!! I was missing the cloud_assets folder! Now this is my code:
local gameNetwork = require "gameNetwork\_corona\_prototype" local CC\_Access\_Key = "MY\_ACCESS\_KEY" local CC\_Secret\_Key = "MY\_SECRET\_KEY" local params = { accessKey = CC\_Access\_Key, secretKey = CC\_Secret\_Key, } gameNetwork.init( "corona", params ) gameNetwork.show( "dashboard" )
But now I have a new problem…I was trying to use the “gameNetwork_corona_prototype” file instead of the standard one “gameNetwork”, and I noticed that if I use a resolution that is different from 320x480 in the config.lua file, the first screen that asks you to register or login, is incorrectly displayed (I mean that the words are out of the frame). I just wanted to ask you if that is going to be fixed.