Problem using OpRaiseEvent in Realtime cloud

Options
CBernstein
edited August 2014 in DotNet
I'm writing my first Photon app to try Realtime, and have been successful at connecting and creating and join rooms; however, I can't seem to get OpRaiseEvent to work in either Realtime or Turnbased using the LoadBalancingClient. I believe I'm doing things just like I see in the DotNet sample apps (demo-loadbalancing and demo-particle-form), but all I can get is -2 (invalid operation code) in my Operation Response handler (the Event handler is never called).

Anybody have any idea what I'm doing wrong?

Comments

  • vadim
    Options
    Check client.State before calling OpRaiseEvent. It should be ClientState.Joined.
    'Invalid operation' on raising event may mean sending to wrong server, probably Master server.
  • Thanks, @Vadim! Rookie mistake and I actually knew better, I started with a copy of my own code to do all of the setup and copied the wrong code. I'll be adding more state checks, now! Appreciate the reply.