Quote:
Originally Posted by Neuro Toxin
You could try using Dynamic (linked in my signature) or a plan Trie.
|
This library looking good, but i dont wanna use it only for 1 callback.
Quote:
Originally Posted by Fyren
The longer answer is I guess you can save the position of the last thing you wrote, then later set the position to that, then read that again to end up with the position being at the end. It also looks like SM's tracking of the datapack size will be wrong if you rewrite earlier portions of the datapack and not at the very end.
|
Probably use this method, but is there way to get rid of that warning:
warning 204: symbol is assigned a value that is never used: "five"
PHP Code:
// Create DataPack
DataPack pack = CreateDataPack();
// Write data to DataPack
pack.WriteCell(client);
pack.WriteString("test");
DataPackPos pos = pack.Position;
pack.WriteCell(5);
// Reset DataPack
pack.Reset();
// Read only client id
int client2 = pack.ReadCell();
// Set position to end
pack.Position = pos;
int five = pack.ReadCell();
// Write new data to the end
pack.WriteCell(6);