Thread: [Battlescape] Adding items in item.cfg errors.

Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11  
    Donator

    Join Date
    Jul 2009
    Posts
    1,452
    Thanks given
    27
    Thanks received
    13
    Rep Power
    69
    Also take in this in mind:

    I've tried to delete a random item from the list, and replacing it with my new item (itemID wise) but it did not work.

    So i cannot add new items to the list at all. Not even if i delete another item so the total item amount doesnt grow.
    Reply With Quote  
     

  2. #12  
    Registered Member
    Join Date
    Nov 2009
    Posts
    72
    Thanks given
    1
    Thanks received
    6
    Rep Power
    0
    If you were using Netbeans or Eclipse, you could go to the line where your error occurs, them it should be real easy for you to find the problem.

    I've just had a look at my item.cfg file, most values are the same. The id, name, info and three first integers that follow are different, but all the other ones are the same.

    Sorry, but I have no idea how it comes. The only way of knowing what really goes wrong, is by going to the specific line of code where the error occurs. You might also want to add some printlines in your loadItemLost method, so you can see what is being done correctly and what's not.

    I can almost only assume that you did use spaces instead of tabs
    Reply With Quote  
     

  3. #13  
    Donator

    Join Date
    Jul 2009
    Posts
    1,452
    Thanks given
    27
    Thanks received
    13
    Rep Power
    69
    Quote Originally Posted by Insdeath View Post
    If you were using Netbeans or Eclipse, you could go to the line where your error occurs, them it should be real easy for you to find the problem.

    I've just had a look at my item.cfg file, most values are the same. The id, name, info and three first integers that follow are different, but all the other ones are the same.

    Sorry, but I have no idea how it comes. The only way of knowing what really goes wrong, is by going to the specific line of code where the error occurs. You might also want to add some printlines in your loadItemLost method, so you can see what is being done correctly and what's not.

    I can almost only assume that you did use spaces instead of tabs
    I did not using spacing but, tabbing.

    Also, errors can infect peaces of code other places, than where the error really is.
    I already posted the error message i get.

    Anyone?
    Reply With Quote  
     

  4. #14  
    Donator

    Join Date
    Jul 2009
    Posts
    1,452
    Thanks given
    27
    Thanks received
    13
    Rep Power
    69
    Quote Originally Posted by Insdeath View Post
    You might also want to add some printlines in your loadItemLost method, so you can see what is being done correctly and what's not.
    How is this done, and why would it help? Please explain
    Reply With Quote  
     

  5. #15  
    Registered Member
    Join Date
    Nov 2009
    Posts
    72
    Thanks given
    1
    Thanks received
    6
    Rep Power
    0
    Quote Originally Posted by masochist View Post
    I did not using spacing but, tabbing.

    Also, errors can infect peaces of code other places, than where the error really is.
    I already posted the error message i get.

    Anyone?
    That's true, but in 90% of the cases, the line of code where the error occurs tells you exactly what's wrong. You might want to take a look at the exact line of code.

    Otherwise, I don't think there is anyone here who can help you with that...
    Reply With Quote  
     

  6. #16  
    Registered Member
    Join Date
    Nov 2009
    Posts
    72
    Thanks given
    1
    Thanks received
    6
    Rep Power
    0
    Quote Originally Posted by masochist View Post
    How is this done, and why would it help? Please explain
    Every time a line in item.cfg is read, it is stored in an object (here most likely an array).

    With this code, you can print the content of that array. Then you might be able to see if something is missing (assuming myArray is the array that needs printed)

    for(int i = 0; i < myArray.length; i++)
    System.out.println(myArray[i]);

    Other ways are printing the line that has been read from Item.cfg.

    You should have a line like this somewhere:
    while ((s = br.readLine()) != null)
    //Do stuff

    Between the stuff that needs to be done and the while(), you should put System.out.println(s);

    Of course, all this requires some basic java skills. If you really cant find anything, you're gonna have to give the code to someone with a little more experience (no offense meant).
    Reply With Quote  
     

Page 2 of 2 FirstFirst 12

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •