Thread: !!!!!!!!!!COMPILING ERRORS!!!!!!! Npc facing help please! URGENT!

Results 1 to 9 of 9
  1. #1 !!!!!!!!!!COMPILING ERRORS!!!!!!! Npc facing help please! URGENT! 
    Registered Member BrittonG's Avatar
    Join Date
    Dec 2012
    Posts
    15
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    Fixed.
    Last edited by BrittonG; 03-24-2013 at 11:18 PM. Reason: Fixed.
    Reply With Quote  
     

  2. #2  
    Registered Member Lewisti's Avatar
    Join Date
    Mar 2012
    Age
    25
    Posts
    445
    Thanks given
    128
    Thanks received
    73
    Rep Power
    63
    Use code tags more easier to fix/read your errors

    Code:
    NPCHandler.java:88: illegal start of type
    if(npcs[i].walkingType) >= 0) {
    ^
    NPCHandler.java:88: ']' expected
    if(npcs[i].walkingType) >= 0) {
    ^
    NPCHandler.java:88: ')' expected
    if(npcs[i].walkingType) >= 0) {
    ^
    NPCHandler.java:88: illegal start of type
    if(npcs[i].walkingType) >= 0) {
    ^
    NPCHandler.java:88: ';' expected
    if(npcs[i].walkingType) >= 0) {
    ^
    5 errors
    Files Compiled Successfully!
    to fix this try and add this

    if (npcs[i].walkingType) >= 0)) {
    Attached image
    Reply With Quote  
     

  3. #3  
    Registered Member
    Karma_K's Avatar
    Join Date
    Nov 2012
    Posts
    4,283
    Thanks given
    152
    Thanks received
    610
    Rep Power
    108
    Quote Originally Posted by BrittonG View Post
    This is my code for npc facing;


    if (npcs[i].walkingType) >= 0) {
    switch(npcs[i].walkingType) {

    case 5:
    npcs[i].turnNpc(npcs[i].absX-1, npcs[i].absY);
    break;

    case 4:
    npcs[i].turnNpc(npcs[i].absX+1, npcs[i].absY);
    break;

    case 3:
    npcs[i].turnNpc(npcs[i].absX, npcs[i].absY-1);
    break;
    case 2:
    npcs[i].turnNpc(npcs[i].absX, npcs[i].absY+1);
    break;

    default:
    if (npc[i].walkingType >= 0) {
    npcs[i].turnNpc(npcs[i].absX, npcs[i].absY); //makes it when npcs move they dont turn back to one direction
    }
    break;
    }
    }



    This is my Compiler Error!;


    NPCHandler.java:88: illegal start of type
    if(npcs[i].walkingType) >= 0) {
    ^
    NPCHandler.java:88: ']' expected
    if(npcs[i].walkingType) >= 0) {
    ^
    NPCHandler.java:88: ')' expected
    if(npcs[i].walkingType) >= 0) {
    ^
    NPCHandler.java:88: illegal start of type
    if(npcs[i].walkingType) >= 0) {
    ^
    NPCHandler.java:88: ';' expected
    if(npcs[i].walkingType) >= 0) {
    ^
    5 errors
    Files Compiled Successfully!

    PLEASE HELP!
    if (npcs[i].walkingType) >= 0)) {
    Reply With Quote  
     

  4. #4  
    Registered Member BrittonG's Avatar
    Join Date
    Dec 2012
    Posts
    15
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Karma_K View Post
    if (npcs[i].walkingType) >= 0)) {
    I tried that, same errors..
    Reply With Quote  
     

  5. #5  
    ¯̿ ̿|̿ ̿ |̶ ̶ ̶ ̶| |̶͇̿ ̶͇̿ ͇̿ Haskelle

    Join Date
    Nov 2007
    Age
    29
    Posts
    1,227
    Thanks given
    329
    Thanks received
    517
    Rep Power
    1133
    you guys are all retards

    [I]if (npcs.walkingType) >= 0) {
    =>
    [I]if ((npcs.walkingType) >= 0) {
    Monads are just Monoids in the category of Endofunctors. What is the problem?
    Costate Comonad Coalgebra is equivalent of Java's member variable update technology for haskell. Problem?
    Reply With Quote  
     

  6. Thankful users:


  7. #6  
    Banned

    Join Date
    Mar 2013
    Posts
    3,036
    Thanks given
    82
    Thanks received
    375
    Rep Power
    0
    Quote Originally Posted by Cups View Post
    you guys are all retards

    [I]if (npcs.walkingType) >= 0) {
    =>
    [I]if ((npcs.walkingType) >= 0) {
    Cups posting on a help section in RS2. Screenied.
    Edit: Compiler? Who still uses that?
    Reply With Quote  
     

  8. #7  
    Registered Member
    Karma_K's Avatar
    Join Date
    Nov 2012
    Posts
    4,283
    Thanks given
    152
    Thanks received
    610
    Rep Power
    108
    Quote Originally Posted by Cups View Post
    you guys are all retards

    [I]if (npcs.walkingType) >= 0) {
    =>
    [I]if ((npcs.walkingType) >= 0) {
    Oh snaps lmfao. Looked at it wrong
    Reply With Quote  
     

  9. #8  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    "if (npcs[i].walkingType) >= 0)) {" is needed to be "if (npcs[i].walkingType >= 0) {"
    Then it should be fine.. Cups thing works too.


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

  10. #9  
    Banned

    Join Date
    Mar 2013
    Posts
    3,036
    Thanks given
    82
    Thanks received
    375
    Rep Power
    0
    Quote Originally Posted by Karma_K View Post
    Oh snaps lmfao. Looked at it wrong
    You answered it wrong actually.
    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. Replies: 3
    Last Post: 11-15-2011, 10:24 PM
  2. Npc Teleporting? help please?
    By digistr in forum Help
    Replies: 1
    Last Post: 07-28-2009, 12:30 PM
  3. Some array error... need some help please
    By Bridget7298 in forum Help
    Replies: 0
    Last Post: 07-14-2009, 01:10 AM
  4. Replies: 11
    Last Post: 04-12-2009, 03:14 PM
  5. NPC combat help please :)
    By Link in forum Requests
    Replies: 2
    Last Post: 02-14-2009, 07:23 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
  •