Try that?Code:if (playerCommand.startsWith("donorzone") && c.playerRights >= 4) { c.getPA().movePlayer(2525,4776, 0, "modern"); if(!c.inWild && c.InDung()) { return; } }
|
|
help please it shoudl work but it dosent
public void DonatorCommands(Client c, String playerCommand)
{
if (playerCommand.startsWith("donorzone") && c.playerRights >= 4) {
c.getPA().startTeleport(2525,4776, 0, "modern");
} else {
if(c.InDung()) {
c.sendMessage("You cannot Teleport here from dung dickhead");
return;
}
if(c.inWild()) {
c.sendMessage("You cannot do this in wilderness idiot");
return;
}
c.getPA().startTeleport(2525,4776, 0, "modern");
}
}
Try that?Code:if (playerCommand.startsWith("donorzone") && c.playerRights >= 4) { c.getPA().movePlayer(2525,4776, 0, "modern"); if(!c.inWild && c.InDung()) { return; } }

Btw why would you flame at your players with this:if (playerCommand.startsWith("donorzone") && c.playerRights >= 4) {
if(c.InDung()) {
c.sendMessage("You cannot Teleport here from dung dickhead");
return;
}
if(c.inWild()) {
c.sendMessage("You cannot do this in wilderness idiot");
return;
}
c.getPA().startTeleport(2525,4776, 0, "modern");
}
}
c.sendMessage("You cannot Teleport here from dung dickhead");c.sendMessage("You cannot do this in wilderness idiot");

bells ur code is reffering to if character is in dung as well as wild at the same time so it will still let u tell out of both instead it should be
Code:if(!c.inWild || !c.InDung()) {
plz correct me if i am wrong?
Error i get anyone else help please thanks anyway
source\server\model\players\packets\Commands.java: 1990: error: method movePlayer
in class PlayerAssistant cannot be applied to given types;
c.getPA().movePlayer(2525,4776, 0, "modern");
^
required: int,int,int
found: int,int,int,String
reason: actual and formal argument lists differ in length
source\server\model\players\packets\Commands.java: 1991: error: cannot find symbo
l
if(!c.inWild && c.InDung()) {
^
symbol: variable inWild
location: variable c of type Client
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
Press any key to continue . . .
ffs put a space between the if first of all and double check ur player tokens to see what the wild token is
another error
source\server\model\players\packets\Commands.java: 1990: error: cannot find symbo
l
if (!c.inWild || !c.InDung()) {
^
symbol: variable inWild
location: variable c of type Client
source\server\model\players\packets\Commands.java: 1994: error: method movePlayer
in class PlayerAssistant cannot be applied to given types;
c.getPA().movePlayer(2525,4776, 0, "modern");
^
required: int,int,int
found: int,int,int,String
reason: actual and formal argument lists differ in length
Note: Some input files use unchecked or unsafe operations.
| « How do i fix this [pi] ? | PKP Wont Work? » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |