mojira.dev
MC-10279

/testfor @a[c=x] does not seem to function properly?

I'm not sure if either I'm not understanding the complete function of count or if it is busted. What I try is to check to see if there are more than 1 player on the server or in the case of an area. I couldn't get this to work properly when checking an area

testfor @a[x=72,7=64,z=80,r=3,c=2]

so I tested it for all on the server.

If I have it set to testfor count=2

testfor @a[c=2]

when I'm the only player on, the comparator still outputs a signal. I would expect this to NOT send out a signal as the players on is 1, not 2.

Comments 3

If you want to test for more than one player on the server, you should be able to do

testfor @a

which will output the # of players online.

The redstone strenght of the output of the comparator is your player count.

So you are telling me it doesn't matter what c= is then? It will always output the signal strength based on players located? Then what is with -1 as stated in the wiki?

Number of players. If negative, uses players from the end of the list first.

Josiah

(Unassigned)

Unconfirmed

Snapshot 13w07a

Retrieved