I am glad to be a new developer on the forums. I enjoy and appreciate your hard work with PlayerIO
- Code: Select all
// Send Player's starting position.
Message sPos = Message.Create("startingPosition");
sPos.Add(player.x);
sPos.Add(player.y);
sPos.Add(player.z);
player.Send(sPos);
^ I send the default values from Server to Client.
- Code: Select all
// Add message listener for player starting position data
connection.addMessageHandler("startingPosition", function(x:int, y:int, z:int) {
character.x = x;
character.y = y;
character.z = z;
trace(x);
trace(y);
trace(z);
})
^ I receive those values in the Client from the Message handler.
The strange bug I'm encountering is that the values x,y,z are retrieved so: z,x,y. In the development server the values of the variables are displayed correctly (when run, it views the values under them accordingly). Also, the code seems very straightforward. My object character is displayed wrongly, z,x,y. The trace shows the wrong values as well.
What could this be?