Hi!
First you have to SplitDataReceived to get some consistent LastDataElement.This plugin splits data where is a comma sign, eg.
If your message looks like 'message',"Some,data,here" it will be split like this:
Socket.LastDataElement(0)="Some"
Socket.LastDataElement(1)="data"
Socket.LastDataElement(2)="here"
As you can notice, Socket.LastDataElement requires an index number, starting from zero.
As for the error i cannot really tell you something useful, if you could post .capx and server code, it would be possible to pin-point the error more accurate.
Also, there is a few versions of that plugin on the forum (it's pretty unstable plugin, there is great community effort to make it more stable, hence a few versions of it exist), so if you could tell us where did you download Socket plugin, or share the plugin here!