Search:

Type: Posts; User: Demetrius82

Search: Search took 0.32 seconds.

  1. Replies
    4
    Views
    1,898

    Re: Null Pointer exception

    When I said I wanted to use the variables between methods I meant having a direction that the user inputs and then inside another method take that direction in order to know what to increase and...
  2. Replies
    4
    Views
    1,898

    Re: Null Pointer exception

    I did what you said, neither of those values are null, I set index to 0, and it printed 0, and item to "sword" and it printed sword. So the values I put in there are not null. Something weird did...
  3. Replies
    4
    Views
    1,898

    Null Pointer exception

    Hey guys, I am a noob to java, and I am so confused at this point in my code that I had to come here. I for some reason am getting a nullpointerException when trying to add something to my arraylist...
  4. Replies
    4
    Views
    2,237

    Re: Array List question

    I think I found a work around, it is not efficient at all I dont think. What I did was in my load values, I was able to have them input what file they wanted to load and in the start of the game they...
  5. Replies
    4
    Views
    2,237

    Re: Array List question

    So have a specific class for where they input all of their values? I have that, the only thing that has to be separate is the inventory as that will happen throughout the game, there is no point to...
  6. Replies
    4
    Views
    2,237

    Array List question

    Hey guys, I am using an arraylist for my rpg to store an inventory and one to store the persons name, place of origin, etc.. Anyway, I need to know of a way to be able to use those same array lists...
  7. Replies
    8
    Views
    1,564

    Re: Question regarding 2d arrays

    Yeah, alright thanks guys for your help!
  8. Replies
    8
    Views
    1,564

    Re: Question regarding 2d arrays

    Ok, so what I would have to do is to store an instance of my class in each cell like at 0,0 all the way to 10,10 if I had a 10 X 10 grid. Correct?
  9. Replies
    8
    Views
    1,564

    Re: Question regarding 2d arrays

    Yes I knew that, but what I was confused on was how to store the instances of that class into an individual cell, that is what I need help on. Like I wanted to make 2darray[0][0] = some call to a...
  10. Replies
    8
    Views
    1,564

    Re: Question regarding 2d arrays

    I am new to java, so bear with me, how exactly would you be able to have each tile hold an object that implements the interface? What would the code for that look like? Would it simply be for me to...
  11. Replies
    8
    Views
    1,564

    Question regarding 2d arrays

    Ok, this may seem like a dumb question, but I am doing a creative project for my AP computer science class, and I chose to do an RPG(original, huh? lol) anyway, it is text based and the way I have it...
Results 1 to 11 of 11