Thread: PI zombie minigame help

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 PI zombie minigame help 
    Registered Member
    Join Date
    Aug 2010
    Posts
    115
    Thanks given
    1
    Thanks received
    3
    Rep Power
    26
    Alright so i followed a copy/paste guide to this minigame since i just wanted it in my server but it didnt have the rounds executed or rounds after the first one blah blah i fixed all that but now im having a problem. when i reach round 8 the server .bat reads an error and than every few seconds (the wait time between waves) it spawns that wave again so i just get piled with zombies. this is the error im recieving -


    error-
    Code:
    [2/19/12 10:24 AM]:     at server.model.minigames.ZombieMiniGame.spawnNextRound(
    ZombieMiniGame.java:26)
    [2/19/12 10:24 AM]:     at server.model.npcs.NPCHandler$2.execute(NPCHandler.jav
    a:1423)
    [2/19/12 10:24 AM]:     at server.event.EventContainer.execute(EventContainer.ja
    va:51)
    [2/19/12 10:24 AM]:     at server.event.EventManager.run(EventManager.java:101)
    [2/19/12 10:24 AM]:     at java.lang.Thread.run(Unknown Source)
    [2/19/12 10:24 AM]: Admin - actionbutton: 29138
    [2/19/12 10:24 AM]: java.lang.ArrayIndexOutOfBoundsException: 8
    and these are the lines that are apparently in question, but im not understanding how

    NPChandler-
    Code:
    private void killedZombie(int i) {
    		final Client c2 = (Client)Server.playerHandler.players[npcs[i].spawnedBy];
    		c2.ZombiesKilled++;
    		//System.out.println("To kill: " + c2.ZombiesToKill + " killed: " + c2.ZombiesKilled);
    		if (c2.ZombiesKilled == c2.ZombiesToKill) {
    			//c2.sendMessage("STARTING EVENT");
    			c2.RoundId++;
    			EventManager.getSingleton().addEvent(new Event() {
    				public void execute(EventContainer c) {
    					if (c2 != null) {
    						Server.zombieMiniGame.spawnNextRound(c2);
    					}	
    					c.stop();
    				}
    			}, 7500);
    			
    		}
    	}
    EventCOntainer -
    Code:
    public void execute() {
    		this.lastRun = System.currentTimeMillis();
    		this.event.execute(this);
    	}
    EventManager -

    Code:
    for (EventContainer container : events) {
    				if (container.isRunning()) {
    					if ((System.currentTimeMillis() - container.getLastRun()) >= container
    							.getTick()) {
    						try {
    							container.execute();
    						} catch (Exception e){e.printStackTrace();}	
    					}
    					if (container.getTick() < waitFor || waitFor == -1) {
    						waitFor = container.getTick();
    					}
    				} else {
    					// add to remove list
    					remove.add(container);
    				}
    			}
    So yea im not sure what to do with this because last time i got this error (i think it was this type of error) i increased the array limit or something (been a year since ive coded) but idk. Thanks in advance to any help!
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Not Funny
    Human's Avatar
    Join Date
    Sep 2011
    Age
    26
    Posts
    175
    Thanks given
    11
    Thanks received
    14
    Rep Power
    0
    There is no tutorial for PI Zombies minigame i think only 508, so ya /:
    Reply With Quote  
     

  4. #3  
    Registered Member
    Join Date
    Aug 2010
    Posts
    115
    Thanks given
    1
    Thanks received
    3
    Rep Power
    26
    http://www.rune-server.org/runescape...game-base.html

    also what i did was do that, fix it up, then looked at the fight caves code and added what i felt was needed for the zombie game since it looks like they are the same. still need help btw
    Reply With Quote  
     

  5. #4  
    Registered Member
    Join Date
    Aug 2010
    Posts
    115
    Thanks given
    1
    Thanks received
    3
    Rep Power
    26
    anybody?
    Reply With Quote  
     

  6. #5  
    Registered Member
    Join Date
    Dec 2011
    Posts
    131
    Thanks given
    0
    Thanks received
    1
    Rep Power
    13
    Well the one error is saying that the number is higher than what you said it should be...so check it out again...and in my opinion a zombie mini game fails...
    Reply With Quote  
     

  7. #6  
    Registered Member
    Join Date
    Aug 2010
    Posts
    115
    Thanks given
    1
    Thanks received
    3
    Rep Power
    26
    lol it isnt gonna be a zombie minigame really, im changing it to be different but the base code was exactly what i was looking for, turns out it was fight pits but who cares... and also thats what im asking like where is this variable thats higher than it should because ive been trying to find it but no luck =O
    Reply With Quote  
     

  8. #7  
    Registered Member
    Join Date
    Aug 2010
    Posts
    115
    Thanks given
    1
    Thanks received
    3
    Rep Power
    26
    Hey i fixed it o.O
    Reply With Quote  
     

  9. Thankful user:


  10. #8  
    Registered Member
    Join Date
    Feb 2012
    Posts
    42
    Thanks given
    0
    Thanks received
    5
    Rep Power
    21
    how did you fix this i am having this problem as well any help would be greatly appreciated
    Reply With Quote  
     

  11. #9  
    Registered Member
    Join Date
    Feb 2012
    Posts
    42
    Thanks given
    0
    Thanks received
    5
    Rep Power
    21
    bump i got same problem any help from someone?
    Reply With Quote  
     

  12. #10  
    Registered Member
    Join Date
    Feb 2012
    Posts
    42
    Thanks given
    0
    Thanks received
    5
    Rep Power
    21
    bump
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. [PI] Zombie Minigame
    By bobismyname in forum Buying
    Replies: 6
    Last Post: 02-08-2012, 05:37 AM
  2. Zombie Minigame
    By Jaegon in forum Buying
    Replies: 4
    Last Post: 10-30-2011, 07:53 AM
  3. zombie minigame need help!!
    By iSacred in forum Help
    Replies: 8
    Last Post: 06-05-2011, 05:16 PM
  4. Zombie Minigame
    By Palidino in forum Show-off
    Replies: 66
    Last Post: 10-14-2009, 02:51 AM
  5. Zombie Minigame
    By Nemmyz in forum Show-off
    Replies: 14
    Last Post: 05-06-2009, 02:05 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •