Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined error in char.header.right_swap_skill = constants.skills[reader.ReadUInt32()].s #40

Closed
ktunkiewicz opened this issue Jan 29, 2022 · 1 comment

Comments

@ktunkiewicz
Copy link

default_header.js:26

char.header.right_swap_skill = constants.skills[reader.ReadUInt32()].s; //0x0084

throws undefined because reader.ReadUInt32() returns 262198.

Save file attached. Bone.d2s.zip

Fixed temporarily by adding a ternary operator that checks for undefined first, not sure if that's correct way of dealing with this but it seams to read all other stuff fine. I'm not even able to verify this because I don't have D2R, I'm writing a script for my friend.

@ktunkiewicz
Copy link
Author

Ah, I'm sorry, that was for 2.0.4 and you made quite lot of changes recently, including using ?.s in the above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant