Uservariable bug

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

Moderators: Lapo, Bax

Post Reply
Richard van Harten
Posts: 14
Joined: 02 Nov 2009, 06:07

Uservariable bug

Post by Richard van Harten »

Hi I noticed this situation -can- occur now in the client depending on room numbering:

A joins room
B joins room

A changes var V
B gets notice of var

B leaves to other room
A changes var V again
A goes also goes to that other room

A changes var V2
B gets notice and also checks var V on A as passed by the uservarchange event

var V on A still has old value from the first change

This happens because on userenter only the user object for the currentroom gets updated. While on uservars it passes with the event the user object from whichever room it got to first in the loop in syshandler.

The core of this problem is that user objects don't get removed from old rooms (possibly because the client doesnt get notifications about users leaving from other rooms )

A quick fix for people who dont use multijoin, change line 534 in syshandler to:

Code: Select all

if (returnUser == null && room == sfs.getActiveRoom())
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Hi,
thanks for submitting the problem, however many things are not clear:

--------------------------------------------------------------------
A joins room (which room?)
B joins room (which room, the same as above?)

A changes var V (User Var or Room Var?)
B gets notice of var

B leaves to other room (which other room?)
A changes var V again
A goes also goes to that other room (which one?)

A changes var V2
B gets notice and also checks var V on A as passed by the uservarchange event
--------------------------------------------------------------------

Please specify rooms with a number or letter so we can better understand and tell us what kind of variables are you changing.
Lapo
--
gotoAndPlay()
...addicted to flash games
Richard van Harten
Posts: 14
Joined: 02 Nov 2009, 06:07

Post by Richard van Harten »

Hi,

The variable is a string and I tried changing it from "state_playing" to "" and
from "state_playing" to "test". Variables mentioned are all uservars.
A joins room (which room?)
B joins room (which room, the same as above?)
Both same room, regardless which one, let's call it A
A changes var V (User Var or Room Var?)
B gets notice of var
User var
B leaves to other room (which other room?)
A changes var V again
A goes also goes to that other room (which one?)
both same room, let's call it B, for this bug to occur it must be internally stored -after- A in the client.
Post Reply