Thread: Orphaned Case - help

Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1 Orphaned Case - help 
    Registered Member
    Join Date
    Jan 2012
    Posts
    20
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    I am trying to add nex Ints into EntityDef.java. This is the first time That I have tried addind a npc into a game. I added this code under "entitydef.readValues(stream);".

    case 13450:
    entityDef.modelIDs = new int[1];
    entityDef.modelIDs[0] = 62717;
    entityDef.name = "Nex";
    entityDef.aByte68 = 3;
    entityDef.actions = new String[5];
    entityDef.actions[1] = "Attack";
    entityDef.aBoolean87 = true;
    entityDef.combatLevel = 1001;
    entityDef.aBoolean93 = true;
    entityDef.anInt85 = 10;
    entityDef.anInt92 = 50;
    entityDef.anInt75 = 19;
    entityDef.anInt79 = 32;
    entityDef.aBoolean84 = true;
    break;
    But when I try and Compile I get this error:



    Could someone please help me.
    Thanks
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Sep 2008
    Posts
    4,833
    Thanks given
    894
    Thanks received
    1,439
    Rep Power
    2924
    Post the case above that one. its likely that you missed out the break above.
    "Know thy self, know thy enemy. A thousand battles, a thousand victories." - Sun Tzu
    GitHub: https://github.com/Faris-Mckay
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2012
    Posts
    20
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    public static EntityDef forID(int i)
    {
    for(int j = 0; j < 20; j++)
    {
    if(cache[j].interfaceType == (long)i)
    {
    return cache[j];
    }
    }

    anInt56 = (anInt56 + 1) % 20;
    EntityDef entitydef = cache[anInt56] = new EntityDef();
    stream.currentOffset = streamIndices[i];
    entitydef.interfaceType = i;
    entitydef.readValues(stream);
    case 13450:
    entityDef.modelIDs = new int[1];
    entityDef.modelIDs[0] = 62717;
    entityDef.name = "Nex";
    entityDef.aByte68 = 3;
    entityDef.actions = new String[5];
    entityDef.actions[1] = "Attack";
    entityDef.aBoolean87 = true;
    entityDef.combatLevel = 1001;
    entityDef.aBoolean93 = true;
    entityDef.anInt85 = 10;
    entityDef.anInt92 = 50;
    entityDef.anInt75 = 19;
    entityDef.anInt79 = 32;
    entityDef.aBoolean84 = true;
    break;
    return entitydef;
    }
    Thats that section. There was no other npcs added, this is the first 1 that is being added.
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Jan 2008
    Age
    31
    Posts
    1,380
    Thanks given
    76
    Thanks received
    384
    Rep Power
    962
    See this?

    Code:
    case 13450:
    entityDef.modelIDs = new int[1];
    entityDef.modelIDs[0] = 62717;
    entityDef.name = "Nex";
    entityDef.aByte68 = 3;
    entityDef.actions = new String[5];
    entityDef.actions[1] = "Attack";
    entityDef.aBoolean87 = true;
    entityDef.combatLevel = 1001;
    entityDef.aBoolean93 = true;
    entityDef.anInt85 = 10;
    entityDef.anInt92 = 50;
    entityDef.anInt75 = 19;
    entityDef.anInt79 = 32;
    entityDef.aBoolean84 = true;
    break;
    return entitydef;
    see the:
    break;
    return entitydef;

    get rid of the return entitydef;
    Reply With Quote  
     

  5. #5  
    Donator

    Arithium's Avatar
    Join Date
    May 2010
    Age
    31
    Posts
    4,721
    Thanks given
    199
    Thanks received
    1,256
    Rep Power
    1114
    Quote Originally Posted by BFMV View Post
    See this?

    Code:
    case 13450:
    entityDef.modelIDs = new int[1];
    entityDef.modelIDs[0] = 62717;
    entityDef.name = "Nex";
    entityDef.aByte68 = 3;
    entityDef.actions = new String[5];
    entityDef.actions[1] = "Attack";
    entityDef.aBoolean87 = true;
    entityDef.combatLevel = 1001;
    entityDef.aBoolean93 = true;
    entityDef.anInt85 = 10;
    entityDef.anInt92 = 50;
    entityDef.anInt75 = 19;
    entityDef.anInt79 = 32;
    entityDef.aBoolean84 = true;
    break;
    return entitydef;
    see the:
    break;
    return entitydef;

    get rid of the return entitydef;
    Wrong, he doesn't even have a switch case.
    Reply With Quote  
     

  6. #6  
    Not Funny
    Human's Avatar
    Join Date
    Sep 2011
    Age
    26
    Posts
    175
    Thanks given
    11
    Thanks received
    14
    Rep Power
    0
    Quote Originally Posted by animeking1120 View Post
    Wrong, he doesn't even have a switch case.
    You don't need a switch case in this circumstance.
    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    Sep 2011
    Posts
    1,140
    Thanks given
    385
    Thanks received
    398
    Rep Power
    474
    Quote Originally Posted by Human View Post
    You don't need a switch case in this circumstance.
    You need a switch statement for every case statement.
    Reply With Quote  
     

  8. #8  
    なぜこのテキストは日本語で書かれている ?

    Kenneh's Avatar
    Join Date
    Dec 2009
    Age
    30
    Posts
    2,753
    Thanks given
    63
    Thanks received
    296
    Rep Power
    478
    y u no switch(i) {

    Code:
    	switch(i) {
    		case 13450:
    			entityDef.modelIDs = new int[1];
    			entityDef.modelIDs[0] = 62717;
    			entityDef.name = "Nex";
    			entityDef.aByte68 = 3;
    			entityDef.actions = new String[5];
    			entityDef.actions[1] = "Attack";
    			entityDef.aBoolean87 = true;
    			entityDef.combatLevel = 1001;
    			entityDef.aBoolean93 = true;
    			entityDef.anInt85 = 10;
    			entityDef.anInt92 = 50;
    			entityDef.anInt75 = 19;
    			entityDef.anInt79 = 32;
    			entityDef.aBoolean84 = true;
    			break;
    		}
    		return entitydef;


    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Jan 2012
    Posts
    20
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Kenneh View Post
    y u no switch(i) {

    Code:
    	switch(i) {
    		case 13450:
    			entityDef.modelIDs = new int[1];
    			entityDef.modelIDs[0] = 62717;
    			entityDef.name = "Nex";
    			entityDef.aByte68 = 3;
    			entityDef.actions = new String[5];
    			entityDef.actions[1] = "Attack";
    			entityDef.aBoolean87 = true;
    			entityDef.combatLevel = 1001;
    			entityDef.aBoolean93 = true;
    			entityDef.anInt85 = 10;
    			entityDef.anInt92 = 50;
    			entityDef.anInt75 = 19;
    			entityDef.anInt79 = 32;
    			entityDef.aBoolean84 = true;
    			break;
    		}
    		return entitydef;
    When I try that I get these errors:

    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Jan 2012
    Posts
    20
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by null View Post
    You need a switch statement for every case statement.
    Would u post how i would add the switch statement please.
    Thanks
    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

Similar Threads

  1. Case Orphaned (case 17) Paying $2
    By Bondie8 in forum Help
    Replies: 13
    Last Post: 11-28-2010, 10:44 AM
  2. Replies: 5
    Last Post: 11-10-2010, 08:05 PM
  3. Replies: 3
    Last Post: 02-16-2009, 06:25 AM
  4. Case 252: Orphaned Case
    By Aeronix in forum Help
    Replies: 20
    Last Post: 02-07-2009, 06:36 PM
  5. Case 130: Orphaned Case?
    By Dark Zero™ in forum Help
    Replies: 11
    Last Post: 10-30-2008, 04:40 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
  •