Thread: get an error with grahams eventmanager...

Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1 get an error with grahams eventmanager... 
    luvgirl12345
    Guest
    Code:
    .\Client.java:1519: addEvent(Event,int) in EventManager cannot be applied to (<a
    nonymous Client.Event>,int)
    EventManager.getSingleton().addEvent(
                               ^
    Note: .\Stream.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    1 error
    does anyone know why i get this error?
    Reply With Quote  
     

  2. #2  
    Member get an error with grahams eventmanager... Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    EventManager.getSingleton().addEvent(new Event() {

    Attached imageAttached image
    Reply With Quote  
     

  3. #3  
    Registered Member
    Chachi's Avatar
    Join Date
    Sep 2008
    Posts
    1,536
    Thanks given
    49
    Thanks received
    103
    Rep Power
    602
    EventManager.getSingleton().addEvent(player, new Event() {

    player for you would be the client so you might need to change it to client.
    [/CENTER]
    Reply With Quote  
     

  4. #4  
    Member get an error with grahams eventmanager... Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    Chachi you can clearly see it's not expecting a Player or Client object..

    Attached imageAttached image
    Reply With Quote  
     

  5. #5  
    luvgirl12345
    Guest
    luke your code is the same as mine just moving the new event up 1 line
    Reply With Quote  
     

  6. #6  
    Registered Member
    Chachi's Avatar
    Join Date
    Sep 2008
    Posts
    1,536
    Thanks given
    49
    Thanks received
    103
    Rep Power
    602
    Quote Originally Posted by Luke132 View Post
    Chachi you can clearly see it's not expecting a Player or Client object..
    My bad Shards Event system is different than the tut Graham posted.
    [/CENTER]
    Reply With Quote  
     

  7. #7  
    Member get an error with grahams eventmanager... Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    It's expecting an Event object (new Event()) then an int, which is the delay

    Code:
    EventManager.getSingleton().addEvent(new Event() {
          @override
          public void execute(Eventcontainer c) {
    
          }
    } delay);
    That's not 100% right, but it's something along those lines.

    Attached imageAttached image
    Reply With Quote  
     

  8. #8  
    luvgirl12345
    Guest
    i know heres my code
    Code:
    EventManager.getSingleton().addEvent(new Event() {
             public void execute(EventContainer c) {
                Yell("Visit our forums at www.blahblah.com!");
                // c.stop(); commented out as not needed
            }
        }, 60000); // executes every 60,000 ms = 60 seconds
    Reply With Quote  
     

  9. #9  
    Member get an error with grahams eventmanager... Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    I really can't see anything wrong with that :\

    Attached imageAttached image
    Reply With Quote  
     

  10. #10  
    luvgirl12345
    Guest
    i put it in run() im not sure if thats right....

    graham said to put it in startup code....
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •