Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Equipments error?

Junior Spellweaver
Joined
Oct 9, 2015
Messages
198
Reaction score
0
Hello guys, I was wondering if u guys can help me with this error please...

I tried the newly HeavenMS, which went so smoothly as soon as I compiled it and moved to the main source folder

It went so smoothly I thought it was so great!

But after the next day, it sent me this error and I was stuck at selecting a channel, it keep loading over and over again

AnthonyLam - Equipments error? - RaGEZONE Forums


I think it got something to do with the equipments on a character...is it?

Please help, thank you in advance! UvU



Edited image :
https://imgur.com/a/NSRJ8
 
Junior Spellweaver
Joined
Oct 9, 2015
Messages
198
Reaction score
0
Oh, okay. At line 1443 I saw this one:

int reqLevel = getEquipStats(equip.getItemId()).get("reqLevel");

I wonder if it has something to do with the wz files too...Because I tried to convert higher version Character.wz and Item.wz to v83, I did make sure it is old GMS encryption and version 83.

The full code is:
public Collection<Item> canWearEquipment(MapleCharacter chr, Collection<Item> items) {
MapleInventory inv = chr.getInventory(MapleInventoryType.EQUIPPED);
if (inv.checked()) {
return items;
}
Collection<Item> itemz = new LinkedList<>();
if (chr.getJob() == MapleJob.SUPERGM || chr.getJob() == MapleJob.GM) {
for (Item item : items) {
Equip equip = (Equip) item;
equip.wear(true);
itemz.add(item);
}
return itemz;
}
boolean highfivestamp = false;
/* Removed because players shouldn't even get this, and gm's should just be gm job.
try {
for (Pair<Item, MapleInventoryType> ii : ItemFactory.INVENTORY.loadItems(chr.getId(), false)) {
if (ii.getRight() == MapleInventoryType.CASH) {
if (ii.getLeft().getItemId() == 5590000) {
highfivestamp = true;
}
}
}
} catch (SQLException ex) {
ex.printStackTrace();
}*/
int tdex = chr.getDex(), tstr = chr.getStr(), tint = chr.getInt(), tluk = chr.getLuk(), fame = chr.getFame();
if (chr.getJob() != MapleJob.SUPERGM || chr.getJob() != MapleJob.GM) {
for (Item item : inv.list()) {
Equip equip = (Equip) item;
tdex += equip.getDex();
tstr += equip.getStr();
tluk += equip.getLuk();
tint += equip.getInt();
}
}
for (Item item : items) {
Equip equip = (Equip) item;
int reqLevel = getEquipStats(equip.getItemId()).get("reqLevel");
if (highfivestamp) {
reqLevel -= 5;
if (reqLevel < 0) {
reqLevel = 0;
}
}
/*
int reqJob = getEquipStats(equip.getItemId()).get("reqJob");
if (reqJob != 0) {
Really hard check, and not really needed in this one
Gm's should just be GM job, and players cannot change jobs.
}*/
if (reqLevel > chr.getLevel()) {
continue;
} else if (getEquipStats(equip.getItemId()).get("reqDEX") > tdex) {
continue;
} else if (getEquipStats(equip.getItemId()).get("reqSTR") > tstr) {
continue;
} else if (getEquipStats(equip.getItemId()).get("reqLUK") > tluk) {
continue;
} else if (getEquipStats(equip.getItemId()).get("reqINT") > tint) {
continue;
}
int reqPOP = getEquipStats(equip.getItemId()).get("reqPOP");
if (reqPOP > 0) {
if (getEquipStats(equip.getItemId()).get("reqPOP") > fame) {
continue;
}
}
equip.wear(true);
itemz.add(equip);
}
inv.checked(true);
return itemz;
}

I kinda mess around the Netbeans...yeah...

I'm a noob new to this type of error and resources, please help me...Thanks ;;;-;;;

P/s: Also thanks sunnyboy for your reply ;;;v;;;
 
Upvote 0
Junior Spellweaver
Joined
Sep 16, 2017
Messages
156
Reaction score
36
Hmm. From experience, a wz-related issue is more likely to cause client errors (especially 0x80030002 or 0x80004003), but a serverside exception like yours may come from something else.

PHP:
int reqLevel = getEquipStats(equip.getItemId()).get("reqLevel");

If you have a null pointer in here, you should try to find out which element of that sentence it is.

Mind please showing the code for getEquipStats?
 
Upvote 0
Junior Spellweaver
Joined
Oct 9, 2015
Messages
198
Reaction score
0
Hmm. From experience, a wz-related issue is more likely to cause client errors (especially 0x80030002 or 0x80004003), but a serverside exception like yours may come from something else.

PHP:
int reqLevel = getEquipStats(equip.getItemId()).get("reqLevel");

If you have a null pointer in here, you should try to find out which element of that sentence it is.

Mind please showing the code for getEquipStats?


Is it this one? :/
public Map<String, Integer> getEquipStats(int itemId) {
if (equipStatsCache.containsKey(itemId)) {
return equipStatsCache.get(itemId);
}
Map<String, Integer> ret = new LinkedHashMap<>();
MapleData item = getItemData(itemId);
if (item == null) {
return null;
}
MapleData info = item.getChildByPath("info");
if (info == null) {
return null;
}
for (MapleData data : info.getChildren()) {
if (data.getName().startsWith("inc")) {
ret.put(data.getName().substring(3), MapleDataTool.getIntConvert(data));
}
/*else if (data.getName().startsWith("req"))
ret.put(data.getName(), MapleDataTool.getInt(data.getName(), info, 0));*/
}
ret.put("reqJob", MapleDataTool.getInt("reqJob", info, 0));
ret.put("reqLevel", MapleDataTool.getInt("reqLevel", info, 0));
ret.put("reqDEX", MapleDataTool.getInt("reqDEX", info, 0));
ret.put("reqSTR", MapleDataTool.getInt("reqSTR", info, 0));
ret.put("reqINT", MapleDataTool.getInt("reqINT", info, 0));
ret.put("reqLUK", MapleDataTool.getInt("reqLUK", info, 0));
ret.put("reqPOP", MapleDataTool.getInt("reqPOP", info, 0));
ret.put("cash", MapleDataTool.getInt("cash", info, 0));
ret.put("tuc", MapleDataTool.getInt("tuc", info, 0));
ret.put("cursed", MapleDataTool.getInt("cursed", info, 0));
ret.put("success", MapleDataTool.getInt("success", info, 0));
ret.put("fs", MapleDataTool.getInt("fs", info, 0));
equipStatsCache.put(itemId, ret);
return ret;
}



Oh wait up guys, I fixed it! xD

The problem is not in the codes, but in the wz files Im using, I was using the original v83 while the HeavenMS was full of Evans-version which is higher than v83 and I didnt use the files which contain them!

So I tried the HeavenMS client file (really thank you to HeavenMS creator ;;;v;;; you made a great source there!)

But then there I meet some more new problems lol. When I open Evans skill tab, the game crashed itself!

Please help, Im a noob UvU, thanks in advance D:
 
Upvote 0
Junior Spellweaver
Joined
Sep 16, 2017
Messages
156
Reaction score
36
Yeah, the function was likely trying to pass a null due to the missing elements in some files, like Character.wz for equipment, and that would cause the error throw.

About the issue with Evan skills tab; I don't know the completion state of the client and server files you're using, but this release by Eric should cover all the "can do" about Evan.
 
Upvote 0
Newbie Spellweaver
Joined
Jul 28, 2017
Messages
40
Reaction score
35
Great you are enjoying that source. :thumbup1:

What I think is going on is that the "getEquipStats(equip.getItemId())" element is giving null there. In other words, the item id from "equip" has no data on the server-side Character.wz XML's.

Since you are trying to change versions, I strongly suggest using "same" client-server WZ setups. By that I mean, take the WZ of the version you are using and generate the corresponding XML's for the server-side (using HaRepacker for instance). This way you will run into less problems regarding inexistent ids, however some Wz fixes of mine could be missed.

Also, if you do this, stay sharp about the EXP/DROP coupons, as the HeavenMS source fetches "buff information" from their Item.wz.xml data, thing that I implemented to make that "buff effect during active time" feature.
 
Upvote 0
Junior Spellweaver
Joined
Oct 9, 2015
Messages
198
Reaction score
0
Yeah, the function was likely trying to pass a null due to the missing elements in some files, like Character.wz for equipment, and that would cause the error throw.

About the issue with Evan skills tab; I don't know the completion state of the client and server files you're using, but this release by Eric should cover all the "can do" about Evan.

I have seen through his release, and asked for various helps last time...and in the end, I gave up :sleep: too many errors, first I got 1, then after and after I got more than 32767 errors lol (its just me negatively "oversaying")
Also I think I just gonna make explorer classes only, I was thinking of making a server in which first time people can only pick explorer jobs, then after rebirths (maximum 5 rebirths each person) you can pick any other job you want to
And yeah, its low-rate... :lol:

Great you are enjoying that source. :thumbup1:

What I think is going on is that the "getEquipStats(equip.getItemId())" element is giving null there. In other words, the item id from "equip" has no data on the server-side Character.wz XML's.

Since you are trying to change versions, I strongly suggest using "same" client-server WZ setups. By that I mean, take the WZ of the version you are using and generate the corresponding XML's for the server-side (using HaRepacker for instance). This way you will run into less problems regarding inexistent ids, however some Wz fixes of mine could be missed.

Also, if you do this, stay sharp about the EXP/DROP coupons, as the HeavenMS source fetches "buff information" from their Item.wz.xml data, thing that I implemented to make that "buff effect during active time" feature.

Ohhhh, great thanks :w00t: I really enjoy your source!
Then it will be really difficult to use "drag-replace" in HaRepacker I guess...since Im just a noob ;;;-;;;
I just wanna add higher version equipments to the old one, but the "drag-replace" method said "You can't copy directories because it requires too much memory"...
So I suppose the wz files suited to the source needed to be the same server XMLs, and I dun wanna miss much of your WZ fixes...wanna try 'em all :3 *intense pokemon reference*
And the EXP/DROP coupons...I tried to query the database in MySQL first, but the drops and shopupdates cannot be queried for some reasons, so I can only see some NX coupons dropping from monsters there...:(:
 
Upvote 0
Junior Spellweaver
Joined
Oct 9, 2015
Messages
198
Reaction score
0
Erm...Is this thread still working? I was wondering if I can continue the thread with another problem...



Suddenly these days the source keeps popping up error code 38 (reached the end of file), I searched the problem like this on the forum and Google, and they said that it is the DC hacker that made this, but I havent opened the server to public yet, so it cant be the DC hacker. I wonder what else made the source not working... Please help, thanks in advance :(
 
Upvote 0
Junior Spellweaver
Joined
Sep 16, 2017
Messages
156
Reaction score
36
You get an error code 38 when you're sending an incomplete packet from server to client (the client expects more data, yet already receives EOF from that packet).
D/c hackers simply exploit badly-handled packets to force the server to send invalid data to whoever would receive third-party view information; generally the whole map the hacker is standing in.

So basically, you have an incomplete packet somewhere. Does the error pop up when you perform a specific action, like speaking with an NPC, going to a specific place, etc etc?
 
Upvote 0
Junior Spellweaver
Joined
Oct 9, 2015
Messages
198
Reaction score
0
You get an error code 38 when you're sending an incomplete packet from server to client (the client expects more data, yet already receives EOF from that packet).
D/c hackers simply exploit badly-handled packets to force the server to send invalid data to whoever would receive third-party view information; generally the whole map the hacker is standing in.

So basically, you have an incomplete packet somewhere. Does the error pop up when you perform a specific action, like speaking with an NPC, going to a specific place, etc etc?

Oh first of all, Im so sorry because my Internet went down for a few days so I took so long to reply and thank you for your reply!

Oh um, I think it happens when I start clicking on a character or creating one, meaning choosing a character leads to my disconnection with the error code 38. I looked through the loadChartoDB or sth like that and saveCharToDB also, but I cant find anything wrong with it. I used the HeavenMS clients and servers to test out, but strangely it only works when I tried mine, but disconnect after around 30mins. Meanwhile the HeavenMS d/c immediately as I chose a character.
 
Upvote 0
Back
Top