Thread: Enum init loop null

Results 1 to 6 of 6
  1. #1 Enum init loop null 
    Registered Member
    Join Date
    Sep 2016
    Posts
    62
    Thanks given
    0
    Thanks received
    7
    Rep Power
    12
    I;m trying to make an enum, using the enum itself as a field.

    But get setting a variation match between two objects, it won't work because you can't load the object before its defined:

    Code:
                    SUPER_ATTACK_VIAL(new int[] { 1, 1 }, Potion.SUPER_ATTACK_FLASK){ //Potion.SUPER_ATTACK_FLASK is error, because it is not defined yet...
    		},
    		SUPER_ATTACK_FLASK(new int[] { 2, 2 }, Potion.SUPER_ATTACK_VIAL){
    		},
    Spoiler for MutinyPS reputation lolol:

    Quote Originally Posted by Ambitious View Post
    Developer on this server is known as "Abys" and scams people to pay off his VPS. Would not trust him AND I have full proof.
    Quote Originally Posted by Zoltus View Post
    Wouldnt trust him either
    Quote Originally Posted by Zoltus View Post
    Wouldnt waste my time on this server. Its so toxic
    Quote Originally Posted by dlomine View Post
    Not very unique, people need to learn to stop rehashing the same shit over and over.
    Reply With Quote  
     

  2. #2  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    SUPER_ATTACK_VIAL2(new int[] { 1, 1 }, Potion.SUPER_ATTACK_FLASK),
    SUPER_ATTACK_FLASK(new int[] { 2, 2 }, Potion.SUPER_ATTACK_VIAL);


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Sep 2016
    Posts
    62
    Thanks given
    0
    Thanks received
    7
    Rep Power
    12
    Quote Originally Posted by arch337 View Post
    SUPER_ATTACK_VIAL2(new int[] { 1, 1 }, Potion.SUPER_ATTACK_FLASK),
    SUPER_ATTACK_FLASK(new int[] { 2, 2 }, Potion.SUPER_ATTACK_VIAL)
    ...?
    Spoiler for MutinyPS reputation lolol:

    Quote Originally Posted by Ambitious View Post
    Developer on this server is known as "Abys" and scams people to pay off his VPS. Would not trust him AND I have full proof.
    Quote Originally Posted by Zoltus View Post
    Wouldnt trust him either
    Quote Originally Posted by Zoltus View Post
    Wouldnt waste my time on this server. Its so toxic
    Quote Originally Posted by dlomine View Post
    Not very unique, people need to learn to stop rehashing the same shit over and over.
    Reply With Quote  
     

  4. #4  
    Respected Member


    Kris's Avatar
    Join Date
    Jun 2016
    Age
    26
    Posts
    3,638
    Thanks given
    820
    Thanks received
    2,642
    Rep Power
    5000
    Quote Originally Posted by player92966 View Post
    ...?
    Compare and contrast.
    No clue as to why you're putting brackets after each and every enum line. Enums don't work as:
    (example)
    Code:
    SUPER_ATTACK(1, 2) {
    }, SUPER_STRENGTH(3, 4) {
    }
    Instead, they go as:
    Code:
    SUPER_ATTACK(1, 2),
    SUPER_STRENGTH(3, 4);
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Sep 2016
    Posts
    62
    Thanks given
    0
    Thanks received
    7
    Rep Power
    12
    Quote Originally Posted by Eldritch View Post
    Compare and contrast.
    No clue as to why you're putting brackets after each and every enum line. Enums don't work as:
    (example)
    Code:
    SUPER_ATTACK(1, 2) {
    }, SUPER_STRENGTH(3, 4) {
    }
    Instead, they go as:
    Code:
    SUPER_ATTACK(1, 2),
    SUPER_STRENGTH(3, 4);
    compare and contrast? lmao what. That guy doesn't know what he's talking about

    Enums do work with brackets... I have brackets because i removed some code to simplify this thread.

    Solved anyway, there is no way to do the method this way, instead you have to define it in another return field.
    Spoiler for MutinyPS reputation lolol:

    Quote Originally Posted by Ambitious View Post
    Developer on this server is known as "Abys" and scams people to pay off his VPS. Would not trust him AND I have full proof.
    Quote Originally Posted by Zoltus View Post
    Wouldnt trust him either
    Quote Originally Posted by Zoltus View Post
    Wouldnt waste my time on this server. Its so toxic
    Quote Originally Posted by dlomine View Post
    Not very unique, people need to learn to stop rehashing the same shit over and over.
    Reply With Quote  
     

  6. #6  
    Contributor


    Join Date
    Jul 2010
    Posts
    450
    Thanks given
    256
    Thanks received
    268
    Rep Power
    1305
    Quote Originally Posted by player92966 View Post
    compare and contrast? lmao what. That guy doesn't know what he's talking about

    Enums do work with brackets... I have brackets because i removed some code to simplify this thread.

    Solved anyway, there is no way to do the method this way, instead you have to define it in another return field.
    You, sir, are an arrogant asshole. First you post in the help section, then you mock on someone who tried to help you. When you post for help, you should be humble and grateful that someone actually tried, regardless of their knowledge or how much it actually helped. I would never even consider giving you a solution if your replies were like this to the previous people. So please keep that in mind the next time you reply on your help thread. In fact, in general, don't mock people, generates unnecessary negative energy.
    Reply With Quote  
     

  7. Thankful users:



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. Init() null when running jar file
    By Bulby Strife in forum Help
    Replies: 3
    Last Post: 07-12-2010, 07:36 AM
  2. Enum, null pointer exception
    By Pilldom in forum Help
    Replies: 2
    Last Post: 12-20-2009, 09:49 PM
  3. Adding proper Anti-Null code
    By SlySoft in forum Tutorials
    Replies: 22
    Last Post: 10-16-2007, 12:28 AM
  4. [ANP] Anti Null Protection (Made by Miss SilabSoft)
    By Ninja Cat in forum Tutorials
    Replies: 13
    Last Post: 09-20-2007, 02:36 AM
  5. How to get rid of nulls (My Way)
    By Mrquarter2 in forum Tutorials
    Replies: 2
    Last Post: 08-16-2007, 03:47 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
  •