User variables reported as changed, but user.getVariable() does not return them.

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

User avatar
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

User variables reported as changed, but user.getVariable() does not return them.

Postby Pippoflash » 26 Apr 2017, 13:48

The user variables changed event sometimes reports variable names, in the array of changed variables, that actually do not belong to the user.

As per SFS client documentation:
changedVars, Array, The list of names of the User Variables that were changed (or created for the first time).

Does this also apply for DELETED variables?

thanks
-----------------------
www.pippoflash.com
-----------------------
User avatar
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

Re: User variables reported as changed, but user.getVariable() does not return them.

Postby Pippoflash » 26 Apr 2017, 13:50

As you can see from this stack trace, event reports variables itemsCollection and inv as changed, but they are not in user list of variables.

210 [SmartFoxMan2x] User variables update:
{changedVars:[0:plL, 1:plp, 2:exp, 3:crd, 4:itemsCollection, 5:inv], user:[User: pid-1472532287432502, Id: 30, isMe: true]}
211 [SmartFoxMan2x] Existing user variables:
[0:[UserVar: pid, type: Double, value: 1472532287432502, private: false], 1:[UserVar: fid, type: String, value: 10157051835830529, private: false], 2:[UserVar: plL, type: Int, value: 4, private: false], 3:[UserVar: dMas, type: Int, value: 0, private: false], 4:[UserVar: nme, type: String, value: Ethan B, private: false], 5:[UserVar: plp, type: Int, value: 86, private: true], 6:[UserVar: pf, type: Int, value: 6, private: false], 7:[UserVar: exp, type: Int, value: 261, private: true], 8:[UserVar: crd, type: Int, value: 92, private: true], 9:[UserVar: cid, type: Int, value: 49, private: false]]
212 [SmartFoxMan2x] SFS reports like changed variables: plL,plp,exp,crd,itemsCollection,inv
213 [SmartFoxMan2x]
********|********************************************************************************
ERROR | Variable itemsCollection reported as changed by SFS, but with user.getVariable() user does not have it.
********|********************************************************************************
214 [SmartFoxMan2x]
********|********************************************************************************
ERROR | Variable inv reported as changed by SFS, but with user.getVariable() user does not have it.
********|********************************************************************************
-----------------------

www.pippoflash.com

-----------------------
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: User variables reported as changed, but user.getVariable() does not return them.

Postby Lapo » 26 Apr 2017, 15:10

Pippoflash wrote:The user variables changed event sometimes reports variable names, in the array of changed variables, that actually do not belong to the user.

As per SFS client documentation:
changedVars, Array, The list of names of the User Variables that were changed (or created for the first time).

Does this also apply for DELETED variables?

thanks

Yes a variable that has been deleted will be part of the changedVariables parameter, since it has changed status.
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

Re: User variables reported as changed, but user.getVariable() does not return them.

Postby Pippoflash » 27 Apr 2017, 12:51

Thank you.
May I suggest to improve description in documentation?
-----------------------

www.pippoflash.com

-----------------------
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: User variables reported as changed, but user.getVariable() does not return them.

Postby Lapo » 27 Apr 2017, 13:31

What do you want us to improve exactly?
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X ActionScript 3 API”

Who is online

Users browsing this forum: No registered users and 10 guests