Jump to content
  • 0

[Help] Java CTF Parse Error!


Sillent
 Share

Question

compile:
    [javac] Compiling 1386 source files to C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\build\classes
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5909: ';' expected
    [javac] 	public void updatePvPStatus()
    [javac] 	                             ^
    [javac] 1 error

BUILD FAILED

 

 

public void updatePvPStatus()

	if ((CTF._started && _inEventCTF))
		return;

{
	if (isInsideZone(ZONE_PVP)) return;
	setPvpFlagLasts(System.currentTimeMillis() + Config.PVP_NORMAL_TIME);

	if (getPvpFlag() == 0)
		startPvPFlag();
}

 

how could i fix it?

 

it is for ctf event!

Link to comment
Share on other sites

Recommended Posts

  • 0

MaestroLuke i have 0,00000001% knowledge of java! :D

 

 

but since i did that i had more errors like

compile:
    [javac] Compiling 1386 source files to C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\build\classes
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: illegal start of type
    [javac] 		if ((CTF._started && _inEventCTF))
    [javac] 		^
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: illegal start of type
    [javac] 		if ((CTF._started && _inEventCTF))
    [javac] 		    ^
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: ')' expected
    [javac] 		if ((CTF._started && _inEventCTF))
    [javac] 		     ^
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: ';' expected
    [javac] 		if ((CTF._started && _inEventCTF))
    [javac] 		        ^
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: <identifier> expected
    [javac] 		if ((CTF._started && _inEventCTF))
    [javac] 		                 ^
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: <identifier> expected
    [javac] 		if ((CTF._started && _inEventCTF))
    [javac] 		                                ^
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: illegal start of type
    [javac] 		if ((CTF._started && _inEventCTF))
    [javac] 		                                 ^
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: <identifier> expected
    [javac] 		if ((CTF._started && _inEventCTF))
    [javac] 		                                  ^
    [javac] 8 errors

BUILD FAILED

Link to comment
Share on other sites

  • 0

Adding the ;

and this (CTF._started && _inEventCTF)

 

i have this error

compile:
    [javac] Compiling 1386 source files to C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\build\classes
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: illegal start of type
    [javac] 		if (CTF._started && _inEventCTF)
    [javac] 		^
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: <identifier> expected
    [javac] 		if (CTF._started && _inEventCTF)
    [javac] 		                ^
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: ';' expected
    [javac] 		if (CTF._started && _inEventCTF)
    [javac] 		                   ^
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: illegal start of type
    [javac] 		if (CTF._started && _inEventCTF)
    [javac] 		                               ^
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: <identifier> expected
    [javac] 		if (CTF._started && _inEventCTF)
    [javac] 		                                ^
    [javac] 5 errors

BUILD FAILED

Link to comment
Share on other sites

  • 0

Adding the ;

and this (CTF._started && _inEventCTF)

 

i have this error

compile:
    [javac] Compiling 1386 source files to C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\build\classes
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: illegal start of type
    [javac] 		if (CTF._started && _inEventCTF)
    [javac] 		^
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: <identifier> expected
    [javac] 		if (CTF._started && _inEventCTF)
    [javac] 		                ^
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: ';' expected
    [javac] 		if (CTF._started && _inEventCTF)
    [javac] 		                   ^
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: illegal start of type
    [javac] 		if (CTF._started && _inEventCTF)
    [javac] 		                               ^
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5911: <identifier> expected
    [javac] 		if (CTF._started && _inEventCTF)
    [javac] 		                                ^
    [javac] 5 errors

BUILD FAILED

where you add ; ?

Link to comment
Share on other sites

  • 0

having it like that:

public void updatePvPStatus()

	if (CTF._started && _inEventCTF)
		return;

 

compile:
    [javac] Compiling 1386 source files to C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\build\classes
    [javac] C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:5909: ';' expected
    [javac] 	public void updatePvPStatus()
    [javac] 	                             ^
    [javac] 1 error

BUILD FAILED
C:\Program Files\eclipse\workspace\L2_Gracia_Final_T2.3\lin2srv\build.xml:75: Compile failed; see the compiler error output for details.

Total time: 6 seconds

Link to comment
Share on other sites

  • 0

AFTER PVP STATUS ISNT A { ?

Edit: I see now :

{

if (CTF._started && _inEventCTF)

return;

 

if (isInsideZone(ZONE_PVP)) return;

setPvpFlagLasts(System.currentTimeMillis() + Config.PVP_NORMAL_TIME);

 

if (getPvpFlag() == 0)

startPvPFlag();

}

now it's correct

Link to comment
Share on other sites

  • 0

I have recently added the CTF Engine from this topic:

http://www.maxcheaters.com/forum/index.php?topic=100774.0

 

You can download my L2PcInstance.java from there:

http://www.4shared.com/file/168432726/9e3cd2cc/L2PcInstance.html

 

From the CTF Engine i have failed adding anything for L2NPCInstance.java but i dont think that this is the error.

Link to comment
Share on other sites

  • 0

AFTER PVP STATUS ISNT A { ?

Edit: I see now :

{

if (CTF._started && _inEventCTF)

return;

 

if (isInsideZone(ZONE_PVP)) return;

setPvpFlagLasts(System.currentTimeMillis() + Config.PVP_NORMAL_TIME);

 

if (getPvpFlag() == 0)

startPvPFlag();

}

now it's correct

Link to comment
Share on other sites

  • 0

Replacing This one:

public void updatePvPStatus()

	if (CTF._started && _inEventCTF)
		return;

{
	if (isInsideZone(ZONE_PVP)) return;
	setPvpFlagLasts(System.currentTimeMillis() + Config.PVP_NORMAL_TIME);

	if (getPvpFlag() == 0)
		startPvPFlag();
}

 

with this one

 

   {
   if (CTF._started && _inEventCTF)
         return;
      
      if (isInsideZone(ZONE_PVP)) return;
      setPvpFlagLasts(System.currentTimeMillis() + Config.PVP_NORMAL_TIME);

      if (getPvpFlag() == 0)
         startPvPFlag();
   }

 

i have over 50 errors!

Link to comment
Share on other sites

  • 0

Replacing This one:

public void updatePvPStatus()

	if (CTF._started && _inEventCTF)
		return;

{
	if (isInsideZone(ZONE_PVP)) return;
	setPvpFlagLasts(System.currentTimeMillis() + Config.PVP_NORMAL_TIME);

	if (getPvpFlag() == 0)
		startPvPFlag();
}

 

with this one

 

   {
   if (CTF._started && _inEventCTF)
         return;
      
      if (isInsideZone(ZONE_PVP)) return;
      setPvpFlagLasts(System.currentTimeMillis() + Config.PVP_NORMAL_TIME);

      if (getPvpFlag() == 0)
         startPvPFlag();
   }

 

i have over 50 errors!

LoL ?

Why you deleted this public void updatePvPStatus() ..

take it full now

 

public void updatePvPStatus()
  {
   if (CTF._started && _inEventCTF)
         return;
      
      if (isInsideZone(ZONE_PVP)) return;
      setPvpFlagLasts(System.currentTimeMillis() + Config.PVP_NORMAL_TIME);

      if (getPvpFlag() == 0)
         startPvPFlag();
   }

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock