View Single Post
headline
SourceMod Moderator
Join Date: Mar 2015
Old 09-18-2017 , 21:57   Re: Set pack position on end not working
Reply With Quote #2

Quote:
Originally Posted by Peace-Maker View Post
You shouldn't be using SetPackPosition. It's setting the position of the internal char* stream to some offset. You'd need to calculate the offset yourself which will likely break easily.

WritePackCell first "pushes" the size of a cell (4 bytes) on the stream then the cell itself (4 bytes again). So you'd need to set the pack position to 5*8=40. It gets trickier with strings in the pack.. You'd be better off with an adt_trie. SetPackPosition should be deprecated as it's of no practical use.
headline is offline