Thread: Panic Randomised block after adding map_index

Results 1 to 2 of 2
  1. #1 Panic Randomised block after adding map_index 
    Registered Member
    Join Date
    Sep 2015
    Posts
    68
    Thanks given
    41
    Thanks received
    75
    Rep Power
    36
    Title pretty much sums it all up, but after replacing map_index with tom's cache suite we get this error:
    PANIC! RANDOMISED BLOCK!
    In this tutorial: https://www.rune-server.ee/runescape...-634-maps.html
    it tells me to replace the start method.
    This is what I currently have:
    Code:
    public void start(StreamLoader streamLoader, client client1) {
        	String as[] = {  "model_version", "anim_version", "midi_version", "map_version" };
        	for(int i = 0; i < 4; i++)
        	{
        	    byte abyte0[] = streamLoader.getDataForName(as[i]);
        	    int j = abyte0.length / 2;
        	    Stream stream = new Stream(abyte0);
        	    versions[i] = new int[j];
        	    fileStatus[i] = new byte[j];
        	    for(int l = 0; l < j; l++)
        		versions[i][l] = stream.readUnsignedWord();
    
        	}
    
        	String as1[] = {
        	    "model_crc", "anim_crc", "midi_crc", "map_crc"
        	};
        	for(int k = 0; k < 4; k++)
        	{
        	    byte abyte1[] = streamLoader.getDataForName(as1[k]);
        	    int i1 = abyte1.length / 4;
        	    Stream stream_1 = new Stream(abyte1);
        	    crcs[k] = new int[i1];
        	    for(int l1 = 0; l1 < i1; l1++)
        		crcs[k][l1] = stream_1.readDWord();
    
        	}
    
        	byte abyte2[] = streamLoader.getDataForName("model_index");
        	int j1 = versions[0].length;
        	modelIndices = new byte[j1];
        	for(int k1 = 0; k1 < j1; k1++)
        	    if(k1 < abyte2.length)
        		modelIndices[k1] = abyte2[k1];
        	    else
        		modelIndices[k1] = 0;
    
        	abyte2 = streamLoader.getDataForName("map_index");
        	Stream stream2 = new Stream(abyte2);
        	j1 = abyte2.length / 7;
        	mapIndices1 = new int[j1];
        	mapIndices2 = new int[j1];
        	mapIndices3 = new int[j1];
        	mapIndices4 = new int[j1];
        	for(int i2 = 0; i2 < j1; i2++)
        	{
        	    mapIndices1[i2] = stream2.readUnsignedWord();
        	    mapIndices2[i2] = stream2.readUnsignedWord();
        	    mapIndices3[i2] = stream2.readUnsignedWord();
        	    mapIndices4[i2] = stream2.readUnsignedByte();
        	}
    
        	abyte2 = streamLoader.getDataForName("anim_index");
        	stream2 = new Stream(abyte2);
        	j1 = abyte2.length / 2;
        	anIntArray1360 = new int[j1];
        	for(int j2 = 0; j2 < j1; j2++)
        	    anIntArray1360[j2] = stream2.readUnsignedWord();
    
        	abyte2 = streamLoader.getDataForName("midi_index");
        	stream2 = new Stream(abyte2);
        	j1 = abyte2.length;
        	anIntArray1348 = new int[j1];
        	for(int k2 = 0; k2 < j1; k2++)
        	    anIntArray1348[k2] = stream2.readUnsignedByte();
    
        	clientInstance = client1;
        	running = true;
        	clientInstance.startRunnable(this, 2);
            }
    and this is what I have to replace it with:
    Code:
    public int mapAmount = 0;
    
        public void start(StreamLoader streamLoader, client client1)
        {
            byte[] abyte2 = streamLoader.getDataForName("map_index");
            Stream stream2 = new Stream(abyte2);
            int j1 = abyte2.length / 6;
            mapIndices1 = new int[j1];
            mapIndices2 = new int[j1];
            mapIndices3 = new int[j1];
            for(int i2 = 0; i2 < j1; i2++)
            {
                mapIndices1[i2] = stream2.readUnsignedWord();
                mapIndices2[i2] = stream2.readUnsignedWord();
                mapIndices3[i2] = stream2.readUnsignedWord();
    mapAmount++;
            }
    	System.out.println("Map Amount: "+mapAmount+"");
            abyte2 = streamLoader.getDataForName("midi_index");
            stream2 = new Stream(abyte2);
            j1 = abyte2.length;
            anIntArray1348 = new int[j1];
            for(int k2 = 0; k2 < j1; k2++)
                anIntArray1348[k2] = stream2.readUnsignedByte();
    
            clientInstance = client1;
            running = true;
            clientInstance.startRunnable(this, 2);
        }
    But as you can see then I miss a lot of code and when I add this I get problems with other data.
    Could someone of you help me out?
    Reply With Quote  
     

  2. #2  
    Donator
    Gladius.'s Avatar
    Join Date
    May 2010
    Posts
    1,160
    Thanks given
    112
    Thanks received
    58
    Rep Power
    11


    Reply With Quote  
     

  3. Thankful user:



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. Panic! Randomised block
    By Gargalhar in forum Help
    Replies: 2
    Last Post: 09-08-2015, 02:40 AM
  2. T2 Error after adding real 317 cache
    By Noosy in forum Help
    Replies: 1
    Last Post: 09-20-2009, 07:26 AM
  3. Replies: 0
    Last Post: 07-06-2009, 08:17 PM
  4. Run error after adding models.
    By Killah.Cam in forum Help
    Replies: 4
    Last Post: 07-03-2009, 10:29 PM
  5. Error after adding shop (Delta)
    By acecoolman123 in forum Help
    Replies: 3
    Last Post: 04-13-2009, 03:48 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •