Well, for one, your code is completely commented out... I'll assume it's a formatting issue:
void main()
{
// The object that activated the item
object oActivator = GetItemActivator();
// The object that oActivator aimed the item at
object oTarget = GetItemActivatedTarget();
// Only worry about saving players
if(FALSE == !GetIsPC(oTarget))
{
// Do the save
if(oTarget == oActivator)
{
ExportSingleCharacter(oActivator);
SendMessageToPC(oActivator, "Your player file has been saved.");
}
else
{
SendMessageToPC(oActivator, GetName(oTarget) + "'s player file has been saved.");
SendMessageToPC(oTarget, GetName(oActivator) + " has forced a save of your player file.");
}
}
// Sass them just a bit if they do something silly
else
{
SendMessageToPC(oActivator, "Somehow I don't think " + GetName(oTarget) + " has a player file since ohhhhh... they are not a PLAYER.");
}
} // END ofvoid main()
This script is essentially overwritting the character file that you are currently using, rather than making a new entry. That is what you want, yes?
EDIT: I made some minor adjustments, but it still works.
Modifié par Evelath, 04 mai 2011 - 02:58 .