when I run my server, i get this:
Code:
[Launcher] Initing Cache...
Exception in thread "main" java.lang.NullPointerException
at com.rs.utils.Utils.getItemDefinitionsSize(Utils.java:268)
at com.rs.cache.loaders.ItemsEquipIds.init(ItemsEquipIds.java:13)
at com.rs.Launcher.main(Launcher.java:65)
Press any key to continue . . .
this is what's in my utils.java:
Code:
public static final int getItemDefinitionsSize() {
final Cache cache = new Cache();
if (cache != null) {
int lastArchiveId = cache.STORE.getIndexes()[19].getLastArchiveId();
return (lastArchiveId * 256 + Cache.STORE.getIndexes()[19]
.getValidFilesCount(lastArchiveId)) - 22314;
} else {
System.out.println("Cache is null");
}
}
This is whats in my itemsequipids.java:
Code:
public static final void init() {
int equipId = 0;
for (int itemId = 0; itemId < Utils.getItemDefinitionsSize(); itemId++) {
ItemDefinitions def = ItemDefinitions
.getItemDefinitions(itemId);
if (def.getMaleWornModelId1() >= 0 || def.getFemaleWornModelId1() >= 0)
equipIds.put(itemId, equipId++);
}
}
And this is what's on line 65 of my launcher.java:
Code:
ItemsEquipIds.init();
What shall I do?