Photon Plugin Needs update

Using corona plugin and calling ,

instance:getGamePeer()

results in the following error

Attempt to call method 'getGamePeer' (a nil value)

Using photon Corona Sdk works fine( i.e. Downloading the photon lib directly from exitGames site).

The new features like getGamePeer() needs to be added in corona plugin.

You should check to make sure your variable “instance” is what you expect it to be. You might also need to enable ATS if you’re building this for iOS.  See: https://coronalabs.com/blog/2015/09/17/about-app-transport-security-ats/

Photon maintains their own plugin.

Rob

Platform : Android

instance:getGamePeer()

According to the docs provided by exitgames,

http://doc-api.photonengine.com/en/corona/current/modules/loadbalancing.LoadBalancingClient.html#instance:getGamePeer

The “instance” in the above code is of type LoadBalancingClient.

--DEMO local photon = require "plugin.photon" local LoadBalancingClient = photon.loadbalancing.LoadBalancingClient local instance = LoadBalancingClient.new(params.MasterAddress, params.AppId, params.AppVersion,clientOptions)

Here calling getGamePeer() gives error if using corona plugin, but the same works fine with exitgames plugin.

The Photon(Exitgames) guys have added some new features that does not exist in current corona plugin. I think you guys also need to update the current plugin.

M4

FYI I don’t believe Corona Labs wrote the Photon Plugin, but it came from their team. They will need to provide the update.

Rob

Why you need LoadBalancingClient:getGamePeer() ?

While plugin is not updated, you may try to workaround this with direct member access: LoadBalancingClient.gamePeer

We will update plugin soon.

Thank you for your response.

LoadBalancingClient.gamePeer is working fine.

I wanted gamePeer object to access a method,

 gamePeer:getRoundTripTime()

You should check to make sure your variable “instance” is what you expect it to be. You might also need to enable ATS if you’re building this for iOS.  See: https://coronalabs.com/blog/2015/09/17/about-app-transport-security-ats/

Photon maintains their own plugin.

Rob

Platform : Android

instance:getGamePeer()

According to the docs provided by exitgames,

http://doc-api.photonengine.com/en/corona/current/modules/loadbalancing.LoadBalancingClient.html#instance:getGamePeer

The “instance” in the above code is of type LoadBalancingClient.

--DEMO local photon = require "plugin.photon" local LoadBalancingClient = photon.loadbalancing.LoadBalancingClient local instance = LoadBalancingClient.new(params.MasterAddress, params.AppId, params.AppVersion,clientOptions)

Here calling getGamePeer() gives error if using corona plugin, but the same works fine with exitgames plugin.

The Photon(Exitgames) guys have added some new features that does not exist in current corona plugin. I think you guys also need to update the current plugin.

M4

FYI I don’t believe Corona Labs wrote the Photon Plugin, but it came from their team. They will need to provide the update.

Rob

Why you need LoadBalancingClient:getGamePeer() ?

While plugin is not updated, you may try to workaround this with direct member access: LoadBalancingClient.gamePeer

We will update plugin soon.

Thank you for your response.

LoadBalancingClient.gamePeer is working fine.

I wanted gamePeer object to access a method,

 gamePeer:getRoundTripTime()