I tried to add people in a certain area to a certain team, but when I went and tested it, the command didn't seem to work.
When I tested it again, but this time with a /say command, I discovered the commandblock uses the wrong coordinates (I couldn't find out which. I walked for 5 minutes with speed 25 and I couldn't find a place where it wouldn't find me anymore)
Steps to reproduce:
1: generate a superflat world
2: have a commandblock continuously run this command (It's the one I used): /say Hi @a[x=1020,y=4,z=-522,dx=1028,dy=2,dz=-518]
3: go into the area where the commandblock should find you according to the command (when I tried this it found me, but it didn't stop when I got out of that area)
4 (optional): use /setblock 1020 4 -522 glowstone and /setblock 1028 2 -528 to see the area in which the commandblock was SUPPOSED to find you
Delta values, or dx dy and dz represent length, height, and width. For example, if you wanted the x value to be between 10 and 15, you would set x=10 and dx=5. Please also note that the d* values should not be negative.