What will match expression do, if no variable is defined?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

armanbm
Posts: 17
Joined: 17 Nov 2016, 06:32

What will match expression do, if no variable is defined?

Postby armanbm » 14 Mar 2017, 10:33

Hello.
I have defined a "USER_VARIABLE_IS_PLAYING" user variable that is assing to each player who is requested to play a game.
but there are some users who have not this variable at all.
what will a mach expression with following criteria will do with users who dont have "USER_VARIABLE_IS_PLAYING" varialbe?

Code: Select all

MatchExpression exp = new MatchExpression(USER_VARIABLE_IS_PLAYING, BoolMatch.EQUALS, false)
List<User> matchingUsers = getApi().findUsers(_ZONE.getUserList(), exp, 2);


will machingUsers contains users who do not have this "USER_VARIABLE_IS_PLAYING" or not?

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

Re: What will match expression do, if no variable is defined?

Postby Lapo » 14 Mar 2017, 15:12

Hi,
I'd expect this to fail, in other words it will only return Users that have that variable set.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 107 guests