#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0

    Having trouble finding the cause exception


    Please delete, fixed all issues, essentially just typos that I finally discovered
  2. #2
  3. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,696
    Rep Power
    347
    Can you post the full text of the error message that shows where the error happens.

    How does the code try to keep the index from going past the end of the array?
    What variable's value is too big?
    Code:
    sub[m][n] = a[i-dx/2 + m][j-dy/2 + n];  //#1 array index out of bounds exception
    Which array? sub or a?
    What is the value of the 4 indexes used with those arrays?
    Add a println() statement to print out the values of those 4 indexes so you can see what their values are.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0
    edit: yep, fixed it completely, nvm, regret making this post, but thanks anyways

IMN logo majestic logo threadwatch logo seochat tools logo