Sender is NULL

You think you've found a bug? Please report it here.

Moderators: Lapo, Bax

Post Reply
Sevil
Posts: 15
Joined: 29 May 2015, 20:38

Sender is NULL

Post by Sevil »

After calling getRoomList() stops working chat (onPublicMessage), shows evt.params.sender == null, it is a bug or why this is happening?? ActionScript 3
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Sender is NULL

Post by Lapo »

You typically call getRoomList just once, after login. Then all Rooms are kept updated by the server for you, transparently.

Can you clarify when you're calling the function?
Lapo
--
gotoAndPlay()
...addicted to flash games
Sevil
Posts: 15
Joined: 29 May 2015, 20:38

Re: Sender is NULL

Post by Sevil »

Yes, I can. The situation is this: there is one room in the area in which players get automatically when you log into the game. Then players can dynamically create the room, as the battle system involves fighting 1v1, when a player creates a room, all the others see that a list is a new application for a fight (create a new room). The player who created the room automatically gets into it and is waiting for the second player, but he also needs to see when there are other rooms or removed. However, when the player is in a new room, he created, not in the initial list is not updated, because the events and onRoomAdded/onRoomDeleted broadcast only in those rooms of which were caused.
I need to allow players to permanently or through what intervals the poll the server for the current status in a zone.
The question is how all the players in the playing area, in all the rooms to get the current list of all creates/delete rooms without causing getRoomList?

p.s. Imagine a situation when you are at home and you need to always be aware of current range in a nearby store. Whether it is possible to do without interacting with it in any way?

I am sorry for any errors in the text. I'm from Russia, and this text was translated by Google translator.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Sender is NULL

Post by Lapo »

I would suggest that players don't leave the Lobby when entering a Game Room.
This way they will keep receiving all updates about other rooms.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
Sevil
Posts: 15
Joined: 29 May 2015, 20:38

Re: Sender is NULL

Post by Sevil »

that is located in two rooms at the same time? how is it possible?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Sender is NULL

Post by Lapo »

Yes, every user can be joined in one or more Rooms.
When you join a second (or third, fourth...) Room you simply specify in your joinRoom(...) call that you don't want the User to leave his previous Room.

By default that is the normal behavior... Join Room X (new), and leave Room Y (old)

If you check the parameters in the joinRoom(...) method there is a "dontLeave" flag. That's what you need.

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
Sevil
Posts: 15
Joined: 29 May 2015, 20:38

Re: Sender is NULL

Post by Sevil »

Thanks, I'll try
Post Reply