Chessnut/NutScript — pull request #162 by Spoffy (2014-07-08 01:02:42+00:00)
Title: Fix: SortedPairs seems to copy the members it iterates over. In this cas...

Fix: SortedPairs seems to copy the members it iterates over. In this case, copying item.data, meaning that it item.data can't be edited inside item.functions.X on the Client only.
Changing to ipairs maintains a consistent(ish) ordering, but removes this issue.

Workarounds involve accessing the item directly through self.GetInventory() and equivalent.