-
Notifications
You must be signed in to change notification settings - Fork 17
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
offset error #61
Comments
PE? Are you talking about mobile? Dimensions will try to read packets as though they are from a PC client. You would need to update it so that it uses the right format. At this time I don't know what the best approach is. You could simply go through the source and edit the packet handlers and some of the other places it writes packets. |
Yes, version code updated but i don't find anything about this offset range. Can you explain how to change it's range? |
It's referring to reading from a buffer. It means that when it was reading a packet, it tried to read a byte at index 9 when the maximum index is 8. Likely because some packet (like player info) has more bytes on PC than mobile. |
So question is how i can manage(change or remove) maximum index value? |
That's not what it means. The maximum index value is based on how much data there is to read from the packet. What you need to do is update dimensions where it reads packets to read the mobile packets instead of pc. |
How i can do that? Since Mobile Version is hard-coded and we can't make changes on there. |
To get the source of the error you can edit |
RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 8. Received 9 What is |
I don't know your level of expertise, so this may or may not be outside of your current knowledge but that stacktrace starts at the internal node code, which isn't Dimensions. You have to follow it down until you see dimensions, which is where it says |
@popstarfreas So after fixing this, i got many many errors but they are also fixed with your guidance. But there is less problems left now: •IP redirection not works properly. Buffer keep sending buffers original IP(Example: Server runs in 0.0.0.1, Buffer runs in 0.0.0.2, while connecting to server, it shows connected from 0.0.0.2(buffers IP). Not causing problems on gameplay but will big issue on bans). Also big thanks to helping to me. After everything works well, i can send pull request working PE Dimensions to your git. |
|
|
|
|
Closed #61 |
@popstarfreas Well there is no old packet handler in your code. How i can find old handler? |
you need to add a method that reads the old chat packet and calls the same method that line of code does. |
That didn't work. Thanks for helping anyway :) |
@popstarfreas After tracing the code, i verified this code will not work in Mobile. I changed it with ChatMessage packet but ChatMessage sends null. |
Reopened #61 |
Nvm i solved this myelf |
Closed #61 |
Since we are working on PE Terraria Servers; when PE Clients tries to connect, this error shows up:
Client Handle Send Data Error: RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 8. Received 9
How we can fix this in code?
The text was updated successfully, but these errors were encountered: