Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.44 KB | None | 0 0
  1. /**
  2. * Check player count.
  3. */
  4. public static int getPlayerCount() {
  5.  
  6. /*
  7. * Counts players inside clan wars
  8. */
  9. public static int getRedClanPlayerCount() {
  10. int redCount = 0;
  11.  
  12. for (Player p : players) {
  13. if (p != null) {
  14. if (p.clanWarsFightArea()) {
  15. if (p.redTeam == 1)
  16. redCount++;
  17. }
  18. }
  19. }
  20. return redCount;
  21. }
  22.  
  23.  
  24. public static int getWhiteClanPlayerCount() {
  25. int whiteCount = 0;
  26.  
  27. for (Player p : players) {
  28. if (p != null) {
  29. if (p.clanWarsFightArea()) {
  30. if (p.whiteTeam == 1)
  31. whiteCount++;
  32. }
  33. }
  34. }
  35. return whiteCount;
  36. }
  37. int count = 0;
  38.  
  39. for (Player p : players) {
  40. if (p != null) {
  41. count++;
  42. }
  43. }
  44. return count;
  45. }
  46.  
  47. /**
  48. * get player count that are in a clan.
  49. */
  50. public static int getBlackClanPlayerCount(int blackCount) {
  51. for (Player p : players) {
  52. if (p != null) {
  53. if (p.clanWarsFightArea()) {
  54. if (p.blackTeam)
  55. blackCount++;
  56. }
  57. }
  58. }
  59. return blackCount;
  60. }
  61.  
  62. /**
  63. * get player count that are in a clan.
  64. */
  65. public static int getWhiteClanPlayerCount(int whiteCount) {
  66. for (Player p : players) {
  67. if (p != null) {
  68. if (p.clanWarsFightArea()) {
  69. if (p.whiteTeam)
  70. whiteCount++;
  71. }
  72. }
  73. }
  74. return whiteCount;
  75. }
  76.  
  77.  
  78. The errors is this:
  79.  
  80. Compiling net/com/codeusa/Engine.java
  81. .\net\com\codeusa\Engine.java:318: illegal start of expression
  82. public static int getRedClanPlayerCount() {
  83. ^
  84. .\net\com\codeusa\Engine.java:318: illegal start of expression
  85. public static int getRedClanPlayerCount() {
  86. ^
  87. .\net\com\codeusa\Engine.java:318: ';' expected
  88. public static int getRedClanPlayerCount() {
  89. ^
  90. .\net\com\codeusa\Engine.java:318: ';' expected
  91. public static int getRedClanPlayerCount() {
  92. ^
  93. .\net\com\codeusa\Engine.java:333: illegal start of expression
  94. public static int getWhiteClanPlayerCount() {
  95. ^
  96. .\net\com\codeusa\Engine.java:333: illegal start of expression
  97. public static int getWhiteClanPlayerCount() {
  98. ^
  99. .\net\com\codeusa\Engine.java:333: ';' expected
  100. public static int getWhiteClanPlayerCount() {
  101. ^
  102. .\net\com\codeusa\Engine.java:333: ';' expected
  103. public static int getWhiteClanPlayerCount() {
  104. ^
  105. 8 errors
  106. Press any key to continue . . .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement