Quantcast
Channel: Forum - Y8 Games - Latest topics
Viewing all articles
Browse latest Browse all 5416

Meta information vanishing

$
0
0

@insanehero wrote:

I am using a 'meta' message to transmit player names to other players in the game room, but I have noticed that sometimes the message is received with no data attached.
At the moment I am catching this and discarding those messages but it seems that sometimes (not always) there is no 'valid' message so the remote player never gets my name.

// this is the call to my function, nickname is my local variable which definitely contains a valid name. I have capitalised the passthrough string to confirm that the message received is definitely from my calls and not a system call with a similar label...
setMeta( { nickname: nickname }, 'NickName' );

// this is my function setMeta, it's just a public static wrapper with some sanity checks before calling idnet.multiplayer
public static function setMeta( _obj : Object, _pt : String = "" ):void
{
if ( idnet && Preloader.multiplayerStarted )
{
trace( "IDI: setMeta", _obj, _pt);
idnet.multiplayer.userMeta( _obj, _pt );
}
}

// this is the debug log with multiplayer.debugLevel = 2, you can see the SMP message does not have a 'meta' field and that the capitalised 'NickName' passthrough is present

SMP: received {"pt":"NickName","action":"meta","errorcode":0,"section":"users","success":true}

So, what happened to the 'meta' data?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5416

Trending Articles