[MC-10279] /testfor @a[c=x] does not seem to function properly? Created: 25/Feb/13  Updated: 25/Feb/13  Resolved: 25/Feb/13

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Snapshot 13w07a
Fix Version/s: None

Type: Bug
Reporter: Josiah Assignee: Unassigned
Resolution: Works As Intended Votes: 0
Labels: None

Confirmation Status: Unconfirmed

 Description   

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   
Comment by Josiah [ 25/Feb/13 ]

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.

Comment by Tails [ 25/Feb/13 ]

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

Comment by [Mod] Ezekiel (ezfe) [ 25/Feb/13 ]

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.

Generated at Sun Jan 12 12:23:50 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.