Search:

Type: Posts; User: Burnett98

Search: Search took 0.07 seconds.

  1. Replies
    27
    Views
    3,480

    Re: Need help with arrays

    Oh... Ok that makes so much sense. Thank you so much for your help. Everything is working perfectly now.
  2. Replies
    27
    Views
    3,480

    Re: Need help with arrays

    No I know that the array itself is static, but why does that make it so that any changes to itself overwrite the whole thing?
  3. Replies
    27
    Views
    3,480

    Re: Need help with arrays

    I believe so, although I don't see why it would make a difference if the array is defined as being static. Non of the individual values being put into it are static. Is this still making a difference?
  4. Replies
    27
    Views
    3,480

    Re: Need help with arrays

    1 eL[1].name=your friend (after [1])
    2 eL[2].name=your friend (after [1])
    3 eL[3].name=your friend (after [1])
    4 eL[4].name=your friend (after [1])
    5 eL[5].name=your friend (after [1])
    6...
  5. Replies
    27
    Views
    3,480

    Re: Need help with arrays

    No I have no idea why it's doing that,
    Here is all the code I'm using for that part:


    Enemy god = new Enemy();
    god.creation("the god", "Smite", "", "", 9999, 9999, 0, 0, 9999, 9999, 1, 9999,...
  6. Replies
    27
    Views
    3,480

    Re: Need help with arrays

    The code I have written for those numbers(4-6) is perfectly fine.


    System.out.println("4 eL[4].name="+enemyList[4].name + " after all has initialized");
    System.out.println("5...
  7. Replies
    27
    Views
    3,480

    Re: Need help with arrays

    No this is in fact after all changes. There aren't very many enemies programmed into the game at the moment. The god is the change to it. If you'd like I can print it step by step through every new...
  8. Replies
    27
    Views
    3,480

    Re: Need help with arrays

    1 eL[1].name=the god after all has initialized
    2 eL[2].name=the god after all has initialized
    3 eL[3].name=the god after all has initialized
    4 eL[4].name=the god after all has initialized
    5...
  9. Replies
    27
    Views
    3,480

    Re: Need help with arrays

    Ok thanks. And I guess I could make it smaller, but then I'd have to go back and reassign numbers later. Also, I have the output. So, when I print out all contents of the array, it lists different...
  10. Replies
    27
    Views
    3,480

    Re: Need help with arrays

    Wait what other printlns do you want me to add. I don't really know what else would be helpful. Also, how would I print out all the contents? Just a println for everything? Because there would be...
  11. Replies
    27
    Views
    3,480

    Re: Need help with arrays

    So here is the output I created. I just put in a few System.out.println commands in various places. The output shows where I did

    1 eL[1].name=your friend after [1] initialized
    1 eL[1].name=the...
  12. Replies
    27
    Views
    3,480

    Re: Need help with arrays

    Oh ok now I get what you're saying. Ok so I put in System.out.println(enemyList[1].name); after every time that something new was put into the array, and it changed to whatever had just been put in,...
  13. Replies
    27
    Views
    3,480

    Re: Need help with arrays

    Oh sorry the ^3 is to specify that it's the third block of code I posted. And I'm currently using JFrames. My output for that battle thing is that I will if fact not battle the enemy contained in...
  14. Replies
    27
    Views
    3,480

    Need help with arrays

    So, I'm working on creating a sort of role playing game. First off, throughout this post I will put little marks to correspond to the code I'm talking about. Down below will be the code organized by...
Results 1 to 14 of 14