Jump to content
  • 0
raivoolen

[PI] errors help ASAP

Question

Hello i'm trying to fix 3 ppl dupe but getting errors :(

errors:

[CODE]src\server\model\players\packets\ClickingButtons.java:3238: error: cannot find s
ymbol
if(Trading.twoTraders(c, ot1)) {
^
symbol: variable ot1
location: class ClickingButtons
src\server\model\players\packets\ClickingButtons.java:3238: error: cannot find s
ymbol
if(Trading.twoTraders(c, ot1)) {
^
symbol: variable Trading
location: class ClickingButtons
src\server\model\players\packets\ClickingButtons.java:3263: error: cannot find s
ymbol
Trading.declineTrade(c, true);
^
symbol: variable Trading
location: class ClickingButtons
src\server\model\players\packets\ClickingButtons.java:3265: error: cannot find s
ymbol
ot1.sendMessage("You can't trade two peo
ple at once!");
^
symbol: variable ot1
location: class ClickingButtons[/CODE]

Share this post


Link to post
Share on other sites

15 answers to this question

Recommended Posts

  • 0
declare your variables Edited by high105

Share this post


Link to post
Share on other sites
  • 0
Can you help me? :/
I dont know what i need to do :c
Not good at variables -.-

Share this post


Link to post
Share on other sites
  • 0
Give me a link to the tutorial you were following

Share this post


Link to post
Share on other sites
  • 0
[quote name='high105']Give me a link to the tutorial you were following[/QUOTE]

[url]http://www.************.org/runescape-development/rs2-server/tutorials/525625-pi-fix-3-trader-dupe.html[/url]

[COLOR="silver"][SIZE=1]- - - Updated - - -[/SIZE][/COLOR]

you know what to put on ************

Share this post


Link to post
Share on other sites
  • 0
Alright so,
I think the tutorial is probably using a different variable then you.
He is using:
[code]
Client ot1 = (Client) PlayerHandler.players[c.tradeWith];
[/code]

So you may want to look for
[code]
(Client) PlayerHandler.players[c.tradeWith];
[/code]
and see what your variable is and then rename ot1 to yours
If you cant get it, I'll be more than happy to help you over Teamviewer

Share this post


Link to post
Share on other sites
  • 0
I tried something but still same :/

Well this is how code looks :c

[CODE]case 13218:
if (System.currentTimeMillis() - c.lastButton < 400) {
c.lastButton = System.currentTimeMillis();
break;

} else {
c.lastButton = System.currentTimeMillis();
}
if(Trading.twoTraders(c, ot1)) {
c.tradeAccepted = true;
Client ot1 = (Client) Server.playerHandler.players[c.tradeWith];
if (ot1 == null) {
c.getTradeAndDuel().declineTrade();
c.sM("Trade declined as the other player has disconnected.");
break;
}

if (c.inTrade && c.tradeConfirmed && ot1.tradeConfirmed && !c.tradeConfirmed2) {
c.tradeConfirmed2 = true;
if(ot1.tradeConfirmed2) {
c.acceptedTrade = true;
ot1.acceptedTrade = true;
c.getTradeAndDuel().giveItems();
ot1.getTradeAndDuel().giveItems();
c.sM("Trade accepted.");
c.SaveGame();
ot1.SaveGame();
ot1.sendMessage("Trade accepted.");
break;
}
ot1.getPA().sendFrame126("Other player has accepted.", 3535);
c.getPA().sendFrame126("Waiting for other player...", 3535);
}
} else {
Trading.declineTrade(c, true);
c.sendMessage("You can't trade two people at once!");
ot1.sendMessage("You can't trade two people at once!");
}
break; [/CODE]

Maybe you can help via this, because my teamviewer is expired :c

Share this post


Link to post
Share on other sites
  • 0
Try adding
[code]
Client ot1 = (Client) PlayerHandler.players[c.tradeWith];
[/code]
Directly under
case 13218:

Share this post


Link to post
Share on other sites
  • 0
[quote name='high105']Try adding
[code]
Client ot1 = (Client) PlayerHandler.players[c.tradeWith];
[/code]
Directly under
case 13218:[/QUOTE]

Amh i don't like errors :s

[CODE]src\server\model\players\packets\ClickingButtons.java:3230: error: cannot find s
ymbol
Client ot1 = (Client) PlayerHandler.players[c.tradeWith]
;
^
symbol: variable PlayerHandler
location: class ClickingButtons
src\server\model\players\packets\ClickingButtons.java:3238: error: cannot find s
ymbol
if(Trading.twoTraders(c, ot1)) {
^
symbol: variable Trading
location: class ClickingButtons
src\server\model\players\packets\ClickingButtons.java:3240: error: variable ot1
is already defined in method processPacket(Client,int,int)
Client ot1 = (Client) Server.playerHandl
er.players[c.tradeWith];
^
src\server\model\players\packets\ClickingButtons.java:3264: error: cannot find s
ymbol
Trading.declineTrade(c, true);
^
symbol: variable Trading
location: class ClickingButtons[/CODE]

Share this post


Link to post
Share on other sites
  • 0
[quote name='raivoolen']Amh i don't like errors :s

[CODE]src\server\model\players\packets\ClickingButtons.java:3230: error: cannot find s
ymbol
Client ot1 = (Client) PlayerHandler.players[c.tradeWith]
;
^
symbol: variable PlayerHandler
location: class ClickingButtons
src\server\model\players\packets\ClickingButtons.java:3238: error: cannot find s
ymbol
if(Trading.twoTraders(c, ot1)) {
^
symbol: variable Trading
location: class ClickingButtons
src\server\model\players\packets\ClickingButtons.java:3240: error: variable ot1
is already defined in method processPacket(Client,int,int)
Client ot1 = (Client) Server.playerHandl
er.players[c.tradeWith];
^
src\server\model\players\packets\ClickingButtons.java:3264: error: cannot find s
ymbol
Trading.declineTrade(c, true);
^
symbol: variable Trading
location: class ClickingButtons[/CODE][/QUOTE]
Replace [B]Trading.[/B]
with
[code]
c.getTradeAndDuel().[/code]

Share this post


Link to post
Share on other sites
  • 0
[quote name='high105']Replace [B]Trading.[/B]
with
[code]
c.getTradeAndDuel().[/code][/QUOTE]

Okay only 3 left :C

[CODE]src\server\model\players\packets\ClickingButtons.java:3230: error: cannot find s
ymbol
Client ot1 = (Client) PlayerHandler.players[c.tradeWith]
;
^
symbol: variable PlayerHandler
location: class ClickingButtons
src\server\model\players\packets\ClickingButtons.java:3240: error: variable ot1
is already defined in method processPacket(Client,int,int)
Client ot1 = (Client) Server.playerHandl
er.players[c.tradeWith];
^
src\server\model\players\packets\ClickingButtons.java:3264: error: cannot find s
ymbol
Trading.declineTrade(c, true);
^
symbol: variable Trading
location: class ClickingButtons[/CODE]

Share this post


Link to post
Share on other sites

×