position.c 316 B

12345678910111213141516171819
  1. #include <stdio.h>
  2. #include "help/query.h"
  3. int main(int argc, char* argv[]) {
  4. if (argc < 3) {
  5. return 1;
  6. }
  7. char* user = argv[1];
  8. char* unit = argv[2];
  9. float x = 0, y = 0, z = 0;
  10. query_unit_position(user, unit, &x, &y, &z);
  11. printf("%.3f %.3f %.3f\n", x, y, z);
  12. return 0;
  13. }