Thread: having problems with adding models

Results 1 to 3 of 3
  1. #1 having problems with adding models 
    Registered Member
    Join Date
    Feb 2015
    Posts
    38
    Thanks given
    5
    Thanks received
    1
    Rep Power
    11
    hey
    im using a server called Ragefire i got the source and the client and the cache from these links :
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]

    i checked the server and the server doesnt have any custom items so i tried to add custom models to the server using the cache but i didnt find any raw or model folder in the cache so i decided to check the codes in client.java and i didnt find any code that adds models from the cache to the server, then i added a few codes to the client.java here what i added :

    Code:
    	public void preloadModels() {
    		String cacheDir = signlink.findcachedir();
    		File file = new File(cacheDir + "data/raw/");
    		File[] fileArray = file.listFiles();
    		int i = 0;
    		int y = 0;
    		int length = fileArray.length;
    		try {
    			for (y = length - 1;; y--) {
    				String s = fileArray[y].getName();
    				byte[] buffer = ReadFile(cacheDir + "data/raw/" + s);
    				String tmp = s.replace(".dat", ""); // getFileNameWithoutExtension(s);
    				if(tmp.startsWith(".")) {
    					continue;
    				}
    				if(tmp.equals("62766")) {
    					continue;
    				}
    				Model.readFirstModelData(buffer, Integer.parseInt(tmp));
    				drawLoadingText(60, "Preloading model " + i + "/" + length + " (" + ((i * 100) / length) + "%)");
    				i++;
    			}
    		} catch (ArrayIndexOutOfBoundsException e) {
    		}
    	}
    and
    Code:
    preloadModels();
    after i added these i tried to compile and there was no error so i went to my itemDefinition.java and added a new item (case)... , then i went to the cache then data folder and i made a new file called raw (as the code say) and i added a new .dat file (new model) and then i lunched the server (there was no errors) and i tried to spawn the item and it went to my inventory but it was invisible then i tried to wear it and after i clicked wear the server crashed and start showing me the same errors repeatedly here is the errors :



    and then it start showing me this error also repeatedly :


    so can any one help me please?
    Reply With Quote  
     

  2. #2  
    Donator

    StanDev's Avatar
    Join Date
    Apr 2014
    Posts
    657
    Thanks given
    70
    Thanks received
    237
    Discord
    StanDev#0990
    Rep Power
    526
    Ur trying to access the value at the index of an array that exceeds the bounds (length) of the array.
    U can try to extend the length of the array.Maybe first try replacing the model of a pre-existing item that shares attributes of the custom; this way u can rule out the issue is model related.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Feb 2015
    Posts
    38
    Thanks given
    5
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by StanDev View Post
    Ur trying to access the value at the index of an array that exceeds the bounds (length) of the array.
    U can try to extend the length of the array.Maybe first try replacing the model of a pre-existing item that shares attributes of the custom; this way u can rule out the issue is model related.
    i never done this before can you show me how?
    Reply With Quote  
     


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. Having problems with adding login screen
    By distryct in forum Help
    Replies: 1
    Last Post: 04-15-2014, 05:54 AM
  2. Replies: 3
    Last Post: 01-12-2014, 04:16 PM
  3. problem with adding npc models
    By Cyradis in forum Help
    Replies: 0
    Last Post: 06-18-2010, 03:43 PM
  4. [Req]Help with adding models[Req]
    By Fall3n_Arch in forum Requests
    Replies: 1
    Last Post: 10-01-2008, 07:59 PM
  5. A few things I have done with the model converter
    By Pkitten in forum RS2 Client
    Replies: 6
    Last Post: 09-03-2008, 10:28 AM
Tags for this Thread

View Tag Cloud

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