It is unclear from your post what the data type of variable "S" is. But the error is telling you that "S" is NOT a structure. You can either:
1) Change "S" to a structure variable containing the data you want to save.
2) Remove the '-struct' argument from the save command.