Thread: Public event

Results 1 to 8 of 8
  1. #1 Public event 
    Registered Member
    Join Date
    Nov 2012
    Posts
    247
    Thanks given
    12
    Thanks received
    1
    Rep Power
    11
    Reply With Quote  
     

  2. #2  
    Donator
    Darkness's Avatar
    Join Date
    Nov 2012
    Age
    26
    Posts
    876
    Thanks given
    121
    Thanks received
    75
    Rep Power
    47
    Edit : NVM just failed. I'll recheck
    Edit 2 : Make sure ItemAssistant.java is in items directory?
    Edit 3 : This getItemName2 is really not useful in fact its a copy past of getItemName ( You could just delete that part and remove all the ' 2 ' off PublicEvent.
    Edit 4 : Maybe it's not reading it right cause it's a duplicate case else its the import
    Import ItemAssistant.java in your PublicEvent file

    Be sure to have this in ItemAssistant:

    Code:
    	public static String getItemName2(int ItemID) {
    		for (int i = 0; i < Config.ITEM_LIMIT; i++) {
    			if (Server.itemHandler.ItemList[i] != null) {
    				if (Server.itemHandler.ItemList[i].itemId == ItemID) {
    					return Server.itemHandler.ItemList[i].itemName;
    				}
    			}
    		}
    		return "Unarmed";
    	}
    Attached image
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Nov 2012
    Posts
    247
    Thanks given
    12
    Thanks received
    1
    Rep Power
    11
    import server.model.items.*; is this it?
    Reply With Quote  
     

  4. #4  
    Donator
    Darkness's Avatar
    Join Date
    Nov 2012
    Age
    26
    Posts
    876
    Thanks given
    121
    Thanks received
    75
    Rep Power
    47
    Quote Originally Posted by coldest View Post
    import server.model.items.*; is this it?
    The items.* Should be working but it doesn't seem to be.. cause it really seems to be the problem.. read the edits to the latest post :\\

    You could add items.ItemAssistant.java; just to be sure ( be sure it is in items directory still)
    Attached image
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Nov 2012
    Posts
    247
    Thanks given
    12
    Thanks received
    1
    Rep Power
    11
    worked thanks
    Reply With Quote  
     

  6. #6  
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,092
    Thanks given
    2,402
    Thanks received
    2,823
    Rep Power
    4550
    You do realize the method getItemName2 is actually in the tutorial right..
    Reply With Quote  
     

  7. #7  
    Donator
    Darkness's Avatar
    Join Date
    Nov 2012
    Age
    26
    Posts
    876
    Thanks given
    121
    Thanks received
    75
    Rep Power
    47
    Quote Originally Posted by Jason View Post
    You do realize the method getItemName2 is actually in the tutorial right..
    He did have it but there was no purposes, and anyways he fixed it , it wasn't imported.
    Attached image
    Reply With Quote  
     

  8. #8  
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,092
    Thanks given
    2,402
    Thanks received
    2,823
    Rep Power
    4550
    Quote Originally Posted by Olinice View Post
    He did have it but there was no purposes, and anyways he fixed it , it wasn't imported.
    The method was called more than two times making the function very useful. Regardless gj fixing a mistake.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [Shard] Using public event instead of Process
    By R0cky 0wnz in forum Help
    Replies: 10
    Last Post: 06-21-2009, 09:51 AM
  2. Some Random Events
    By Eleclion in forum Tutorials
    Replies: 4
    Last Post: 05-15-2007, 11:38 PM
  3. Guardian Random Events
    By Eleclion in forum Tutorials
    Replies: 3
    Last Post: 05-12-2007, 08:21 PM
  4. Replies: 6
    Last Post: 05-09-2007, 12:35 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •