Line 3 (SendMessageToPC) is not right. I get an unknown compiler state. What should it be?
nValue = GetLocalInt(oPC, “BasementRatDead”) + 1;
SetLocalInt(oPC, “BasementRatDead”, nValue);
SendMessageToPC(oPC, “+IntToString(nValue)+” rats dead");
I’m trying to debug another script and want to see what value local int “BasementRatDead” is every time a rat is killed. This is placed at the end of the standard on death script as a new modified script.
Here’s the entire added on script. There are no compiler problems if that last line is removed:
int nValue; // Get the creature who triggered this event. object oPC = GetLastKiller(); // We are really interested in the ultimate master of the killer. while ( GetMaster(oPC) != OBJECT_INVALID ) oPC = GetMaster(oPC); // Only fire once. if ( GetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF)) ) return; SetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF), TRUE); // Set a local integer. nValue = GetLocalInt(oPC, "BasementRatDead") + 1; SetLocalInt(oPC, "BasementRatDead", nValue); SendMessageToPC(oPC, "+IntToString(nValue)+" rats dead");