Jump to content
  • 0

[Help] Java CTF Parse Error!


Question

Posted

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!

Recommended Posts

  • 0
Posted

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

  • 0
Posted

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

  • 0
Posted

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 ; ?

  • 0
Posted

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

  • 0
Posted

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

  • 0
Posted

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.

  • 0
Posted

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

  • 0
Posted

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!

  • 0
Posted

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();
   }

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.



×
×
  • Create New...