Advertisement
Guest User

Untitled

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