...
Excerpt |
---|
Determine whether two players are allies with each other. |
Availability
3.1 Beta 1 and above.
Syntax
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
var returnValue = allianceExistsBetween(playerA, playerB); |
...
Parameter | Type | Mandatory | Description | Game version |
---|---|---|---|---|
playerA | Number | The ID of the first player | 3.1 Beta 1 | |
playerB | Number | The ID of the second player | 3.1 Beta 1 |
Return value
Value | Type | Description | Game verison |
---|---|---|---|
true | Boolean | Indicates that the two players are allied with each other | 3.1 Beta 1 |
false | Boolean | The two players are enemies of each other | 3.1 Beta 1 |
<error> | Error | One of the players specified does not exist | 3.1 Beta 1 |
Example
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
if (!allianceExistsBetween(me,theOtherPlayer)) attackTheOtherPlayer(); |
...