What's wrong with this NPC?

Results 1 to 6 of 6
  1. #1
    Coder in-training lordpeter is offline
    MemberRank
    Dec 2008 Join Date
    CanadaLocation
    612Posts

    What's wrong with this NPC?

    Fixed the problem
    Last edited by lordpeter; 11-07-12 at 09:16 PM.


  2. #2
    Alpha Member Vakarian is offline
    MemberRank
    Apr 2008 Join Date
    Ohio, USALocation
    2,134Posts

    Re: What's wrong with this NPC?

    These:

    Code:
     if(m = 1) { ... }
    Change it to

    Code:
     if(m == 1) { ... }
    Also, take a look at using else if's. Using only if's as often as you do in this code is bad-bad-bad-bad-bad.

  3. #3
    Coder in-training lordpeter is offline
    MemberRank
    Dec 2008 Join Date
    CanadaLocation
    612Posts

    Re: What's wrong with this NPC?

    Quote Originally Posted by Vakarian View Post
    These:

    Code:
     if(m = 1) { ... }
    Change it to

    Code:
     if(m == 1) { ... }
    Also, take a look at using else if's. Using only if's as often as you do in this code is bad-bad-bad-bad-bad.
    I never knew you could use else ifs in Java Script. Sorry, I've only learned visual basic in school so I'm still learning.

  4. #4
    Alpha Member Vakarian is offline
    MemberRank
    Apr 2008 Join Date
    Ohio, USALocation
    2,134Posts

    Re: What's wrong with this NPC?

    Making those changes to your OP was kind of dumb... test it first.

  5. #5
    Coder in-training lordpeter is offline
    MemberRank
    Dec 2008 Join Date
    CanadaLocation
    612Posts

    Re: What's wrong with this NPC?

    Quote Originally Posted by Vakarian View Post
    Making those changes to your OP was kind of dumb... test it first.
    It DC's me.

    @Vakarian: what was dumb about it?

    bump~
    anyone know the problem + solution?

  6. #6
    Account Upgraded | Title Enabled! BlessTheKnife is offline
    MemberRank
    Sep 2009 Join Date
    553Posts

    Re: What's wrong with this NPC?

    You gonna end up releasing it? :P
    Last edited by BlessTheKnife; 11-07-12 at 09:32 PM.



Advertisement