The following code snippet
case X2_ITEM_EVENT_UNACQUIRE:
// * This code runs when the item is unacquired
// * Note that this event fires for PCs only
oPC = GetModuleItemLostBy(); // The player who dropped the item
oItem = GetModuleItemLost(); // The item that was dropped
object oHolder = GetItemPossessor(oItem);
if(oHolder == OBJECT_INVALID) // in other words, not in a creature or container inventory
{
object oPlaceable = CreateObject(OBJECT_TYPE_PLACEABLE, "ancientmapoft", GetLocation(oPC));
DestroyObject(OBJECT_SELF, 1.0f);
}
break;
case X2_ITEM_EVENT_SPELLCAST_AT:
ERROR: SKIPPING DECLARATION VIA "case" STATEMENT DISALLOWED
at the 2nd case statement above. By the use of the // comment operator I have been able to isolate the offending bit of code to the section
object oHolder = GetItemPossessor(oItem);
if(oHolder == OBJECT_INVALID) // in other words, not in a creature or container inventory
{
object oPlaceable = CreateObject(OBJECT_TYPE_PLACEABLE, "ancientmapoft", GetLocation(oPC));
DestroyObject(OBJECT_SELF, 1.0f);
}





Retour en haut







