setNameColor/setTitleColor error on compiling

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
PapaHarni
Posts: 31
Joined: Wed Jun 04, 2008 3:24 pm
Location: Germany/NRW/H.a.S.
Contact:

setNameColor/setTitleColor error on compiling

Post by PapaHarni »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number: 4159
L2JDP Revision Number: 7391

Hello Boy and Girls,

i have an error on compiling but i don't know why. I think its all correctly in my eyes.

Here is the error Message out of eclipse :

Code: Select all

     [javac] L2_GameServer\java\com\l2jserver\gameserver\model\actor\instance\L2PcInstance.java:7362: cannot find symbol    [javac] symbol  : method setNameColor(java.lang.String)    [javac] location: class com.l2jserver.gameserver.model.actor.appearance.PcAppearance    [javac] 				player.getAppearance().setNameColor(names_color);    [javac] 				                      ^    [javac] L2_GameServer\java\com\l2jserver\gameserver\model\actor\instance\L2PcInstance.java:7363: cannot find symbol    [javac] symbol  : method setTitleColor(java.lang.String)    [javac] location: class com.l2jserver.gameserver.model.actor.appearance.PcAppearance    [javac] 				player.getAppearance().setTitleColor(titles_color);    [javac] 				                      ^    [javac] 2 errors 
And here is my Code :

Code: Select all

 				String names_color = "";				String titles_color = "";				if(player.getClan() != null) {					PreparedStatement statement3 = con.prepareStatement(RESTORE_CLAN_COLOR);					statement3.setInt(1, clanId);					ResultSet result3 = statement3.executeQuery();					if(result3.next()) {						names_color = result3.getString("namecolor");						titles_color = result3.getString("titlecolor");					}					result3.close();		                        statement3.close();				} else {					names_color = rset.getString("namecolor");					titles_color = rset.getString("titlecolor");				}				player.getAppearance().setNameColor(names_color);				player.getAppearance().setTitleColor(titles_color);				//Set Name and Title Color 
I hope someone can give me tip and/or can help me.
PapaHarni
Posts: 31
Joined: Wed Jun 04, 2008 3:24 pm
Location: Germany/NRW/H.a.S.
Contact:

Re: setNameColor/setTitleColor error on compiling

Post by PapaHarni »

Why is the color a int and not a String? oO

I think color is a String ( FFFFFF = White ). Where is this a int?
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: setNameColor/setTitleColor error on compiling

Post by janiii »

color is an int, like 0xffffff - notice the 0x at the beginning, that is the notation for hexadecimal number. you have to convert a FFFFFF string to an int, using Integer.decode() method. check existing code for player name and title color from config.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
Post Reply