serversidecode, user.send method not working

fabidifabidi zei

een tijd geleden | Bericht #1
Hi I'm new to using nonoba mp api.

Right now what I need to do is get the client to know what his user id is to he can filter the messages that the server broadcasts.
I was using this bit of code
public override void UserJoined(Player player) {
// send one message to the player upon joining the game
player.Send("hi",1,"strings are okay also",true)
}

The above message never triggers the onMessage event. The broadcast method works fine though.

NonobaAPI.GetUsername. I have this called when the ConnectionEvent.INIT method is called and it still gives me the message the NonobaAPI.NOT_LOGGED_IN response.

How to ppl?

fabidifabidi zei

een tijd geleden | Bericht #2
Ok I got it. I sent a message from the client with a type like WHATS_MY_NAME and in that case have the server call user.Send in GotMessage, then it works.

Apparently UserJoined is called on the server before the user is logged in so that's why user.Send doesn't work in that method. Is it so?

OliverOliver zei

een tijd geleden | Bericht #3
Everything sent to the user in the UserJoined method should be buffered up and sent when the connection is fully established.

Do you have some test code that reproduces the error? then we can look at it?

My e-mail is my username at this sites domain.

-- Oliver

Antwoord op onderwerp

Schrijf je nu in om te kunnen antwoorden op onderwerpen

Nonoba

nonoba.nl is een onafhankelijke spelletjes site waar je zowel individueel als gezamenlijk spelletjes gratis kunt spelen.

Developer gereedschap

Als je een flash spelontwerper bent hebben we gave gereedschappen die je kunnen helpen om nog betere spellen te ontwikkelen.

Geweldige Spellen

Waarom probeer je niet een van de beste online flah spellen die wij hebben voor nop?

Copyright ©2007-2012 Nonoba™ - All rights reserved.62.4001ms on SERVER34096