Sierra Westhaven wrote...
Does anyone know where my script is going wrong? Thanks!
In your first script, you are simply getting the calendar day, but not saving that on anything. Therefore, when you check the calendar day in the second script, nCurrentDay == 0. Since you have it set to "if nCurrentDay is less than or equal to 1 show the convo line", it will always appear (again since nCurrentDay == 0, ie. less than 1).
For the first script, try something like this:
void main()
{
object oPC = GetPCSpeaker();
int nPCDay = GetCalendarDay();
SetLocalInt(oPC, "CurrentDay", nPCDay);
}
In the second script:
int StartingConditional()
{
object oPC = GetPCSpeaker();
int nCurrentDay = GetCalendarDay();
int nPCDay = GetLocalInt(oPC, "CurrentDay");
if(nCurrentDay == nPCDay +1) return TRUE;
return FALSE;
}
The potential problem here though is that what happens if the first day is the last day of the month, and the second day is the first day of the month? If that happens, then the second day will not == nPCDay + 1. Hope you can understand what I mean by that. So you need to change the "return TRUE" line in the second script to account for that possibility.
Modifié par _Knightmare_, 05 décembre 2010 - 02:59 .