View Single Post
Old 12-19-2012, 06:46 PM   PM User | #3
bullet1
New to the CF scene

 
Join Date: Dec 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
bullet1 is an unknown quantity at this point
Thank's for your reply, i did it but i doesn't work, here is my code :
Code:
	if(infos.length == 0)return;
        String items = _perso.getItemsIDSplitByChar(";"); // it's the function that take the value of the field and separate the IDS by ";"
                            	String[] item = items.split(";");
                            	int id = 141375;
                            	for (int i = 0; i < item.length; i++)
                            	{
                            		if (item[i] != null && item[i].equals(id)) {
                            			SocketManager.GAME_SEND_MESSAGE(_perso, "You have the item", Ancestra.COLOR_BLEU2);
                            			break;
                            		}
                            		else
                            		{
                            			SocketManager.GAME_SEND_MESSAGE(_perso, "You don't have the item", Ancestra.COLOR_ERROR);
                            			break;
                            		}
It always show "You don't have the item" even if the ID exist in the field :S
bullet1 is offline   Reply With Quote