Hello Scripters,
I have just two question of this issue:
1) In this case, supposing that the integer variable "Aaaaa" could change because another event script, what happens in the check of the void "doCheck()"? The iCurrentVal variable will be different of the iInitialVal?
2) Do the loop here works fine? The object oAny will be unique because of the delay of 60 seconds or only one? What happens with the loop when we have delay inside?
void doCheck(object oPC, int iInitialVal)
{
int iCurrentVal = GetLocalInt(oPC, "Aaaaa");
if(iCurrentVal == iInitialVal)
{
// * The actions I want that must be added here.
}
}
void main()
{
object oAny = GetFirstPC();
int iInitialVal;
while(GetIsObjectValid(oAny))
{
SetLocalInt(oAny, "Aaaaa", Random(999999)+1);
iInitialVal = GetLocalInt(oAny,"Aaaaa");
DelayCommand(60.0, doCheck(oAny, iInitialVal));
oAny = GetNextPC();
}
}