Thread: Compiler error: non-static method cannot be referenced

Results 1 to 4 of 4
  1. #1 Compiler error: non-static method cannot be referenced 
    H_E_N_T_A_I_H_E_A_V_E_N_
    Tatsumi's Avatar
    Join Date
    May 2013
    Posts
    1,779
    Thanks given
    537
    Thanks received
    269
    Rep Power
    337
    k so in my clickitem.java i added
    Code:
    		if(itemId == 4053) {
    			c.getItems().deleteItem(4053,c.getItems().getItemSlot(4053),1);
    			NPCHandler.spawnNpc2(1532, c.absX, c.absY, 0, 0,200,0,0,100);
    			c.sendMessage("You setup a barricade.");
    		}
    but i get this error



    Whats wrong?
    Attached image
    Reply With Quote  
     

  2. #2  
    Donator


    Join Date
    Mar 2013
    Age
    24
    Posts
    1,767
    Thanks given
    335
    Thanks received
    386
    Rep Power
    318
    Are you really that bad with Java?
    NPCHandler.java > spawnNpc2 is not static
    Reply With Quote  
     

  3. #3  
    H_E_N_T_A_I_H_E_A_V_E_N_
    Tatsumi's Avatar
    Join Date
    May 2013
    Posts
    1,779
    Thanks given
    537
    Thanks received
    269
    Rep Power
    337
    Quote Originally Posted by Sir Paramvir View Post
    Are you really that bad with Java?
    NPCHandler.java > spawnNpc2 is not static
    Na i just didnt use eclipse. I fixed it This is the 3rd time i fixed myself. Next time i wont make a thread
    Attached image
    Reply With Quote  
     

  4. #4  
    Donator


    Join Date
    Mar 2013
    Age
    24
    Posts
    1,767
    Thanks given
    335
    Thanks received
    386
    Rep Power
    318
    Quote Originally Posted by nade View Post
    Na i just didnt use eclipse. I fixed it This is the 3rd time i fixed myself. Next time i wont make a thread
    What does Eclispe have to do with anything... Plus you should easily be able to read the Compiler's Message. But whatever, next time first try solving before you give up and ask for help.
    Reply With Quote  
     

  5. Thankful user:



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. Replies: 0
    Last Post: 03-16-2013, 12:42 PM
  2. Replies: 17
    Last Post: 12-11-2012, 06:39 AM
  3. Replies: 4
    Last Post: 09-17-2012, 06:42 PM
  4. Replies: 5
    Last Post: 09-18-2010, 12:08 AM
  5. Replies: 7
    Last Post: 07-07-2009, 11:12 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •