Thread: need help with objects.[pi]

Results 1 to 3 of 3
  1. #1 need help with objects.[pi] 
    Registered Member
    Join Date
    Dec 2009
    Posts
    27
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    i am looking to make it so that when you click an object in game it spawns a new object directly on top of the object you click, therefore erasing the previous object with the new one.

    The code that is needed should (to my understanding) be put in ActionHandler.java under the title
    Code:
      case ####;   // where  #### = object id
    the code I have tried adding to do this is
    Code:
    case ####:
    Server.objectHandler.addObject(new Objects(ObjectId, objectX, objectY, 0, -1, 10, ObjectId, 0));
    break;
    I keep getting one error from this code saying
    Code:
    src\server\model\players\ActionHandler.java:52: error: cannot find symbol
    Server.objectHandler.addObject(new Objects(117, c.objectX, c.objectY, 0, -1, 10,
     117, 0));
                                       ^
      symbol:   class Objects
      location: class ActionHandler
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    1 error
    Press any key to continue . . .
    if anybody can tell me what's either wrong with the code or if the code itself won't do what I want it to, I'd be very grateful.

    if you say that the code is wrong, please give me hints or tell me on how i can redo it so that it does do what i would like.
    Reply With Quote  
     

  2. #2  
    Austin_
    Guest
    It can't find the object method in the actionhandler class. Add it or import that package it's in.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Dec 2009
    Posts
    27
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Thanks, I managed to work it out. I had the wrong code completely though your comment about adding in the methods was also neeeded -Repped
    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. [Objects] How to spawn objects
    By rb0opkz in forum Requests
    Replies: 4
    Last Post: 08-17-2009, 12:17 AM
  2. [Objects] How to spawn objects
    By rb0opkz in forum Help
    Replies: 8
    Last Post: 08-15-2009, 10:48 PM
  3. Replies: 7
    Last Post: 07-19-2009, 06:08 PM
  4. How To Add Objects
    By Infinityyy in forum Tutorials
    Replies: 16
    Last Post: 07-19-2009, 01:28 AM
  5. Objects.
    By rsnoob in forum Help
    Replies: 4
    Last Post: 01-25-2009, 06:08 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
  •