Page 1 of 1

[0.17.79] RCON message IDs won't go over 255

Posted: Sat Jan 11, 2020 7:09 pm
by Nicksaurus
If you send an RCON message to a factorio server with a message ID higher than 255, the ID you get in the response will be [your ID] % 256. Here's some example output from my program:
RCON error.png
RCON error.png (29.17 KiB) Viewed 1565 times
You can see at the bottom that I'm sending a message with an ID of 256 and receiving a response with an ID of 0.

The RCON specification (https://developer.valvesoftware.com/wik ... #Packet_ID) states that the ID can be 'any positive integer', so I would expect it to be able to go higher

Re: [0.17.79] RCON message IDs won't go over 255

Posted: Sat Jan 11, 2020 8:25 pm
by Rseding91
Thanks for the report. It should be fixed for the next release. It looks like the message ID was getting swapped with the client ID which just happens to be an ever-incrementing number and some how that worked this entire time (???) I guess everyones message IDs were also ever-incrementing numbers. Or something.

Re: [0.17.79] RCON message IDs won't go over 255

Posted: Sat Jan 11, 2020 8:51 pm
by Rseding91
Actually ignore what I said. It seems everything was correct and the issue is most likely on your end. I've had 2 other people test and they can encode and send message IDs over 255 without issue so what ever is going wrong is on your end with how you're encoding or decoding them.

Re: [0.17.79] RCON message IDs won't go over 255

Posted: Sat Jan 11, 2020 8:53 pm
by boskid
79956.png
79956.png (30.38 KiB) Viewed 1544 times

Re: [0.17.79] RCON message IDs won't go over 255

Posted: Sat Jan 11, 2020 9:48 pm
by Nicksaurus
Rseding91 wrote:
Sat Jan 11, 2020 8:51 pm
Actually ignore what I said. It seems everything was correct and the issue is most likely on your end. I've had 2 other people test and they can encode and send message IDs over 255 without issue so what ever is going wrong is on your end with how you're encoding or decoding them.
Ah, you're right. It turns out I was truncating the ID in my requests. Sorry for wasting your time.